Discussion Forums  >  WebViews and HTML for Mobile

Replies: 2    Views: 182

mishgolf
Aspiring developer
Profile
Posts: 98
Reg: Nov 02, 2012
Sunshine Coast,...
980
05/15/13 03:18 PM (11 years ago)

CSS with Buzztouch

Hi, I'm wanting to try and use CSS for an app using buzztouch. I havent used CSS before but have some knowledge of html. i have a bunch of html pages i want to have the same format and want to save myself extra work in the long run instead of doing each page individually. if i did use CSS would i only need to add the CSS file into BT_Docs? does anyone have any good advice to use the html in buzztouch effectively? thanks
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/15/13 03:24 PM (11 years ago)
You can add CSS in a few different ways. The cleanest way is to have it in a separate file included in the BT_Docs folder. However, you can also add it in directly into the .html file using two different methods: 1) In the <head></head> section, just add a style sheet in like so: <style> #someID { color:#ffffff; font-size:24px; } .someClass { color:#cccccc; font-size:12px; } </style> ---------------------------------------- 2) The second method is to add it 'in-line', like so: <span style="color:red; font-size:45px;"> <div>some content here</div> </span>
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/16/13 03:19 AM (11 years ago)
Hi, As Chris rightly said the CSS style sheet goes to the BT_Docs folder. He also mentioned the three methods (external, internal and in-line). You choice depends on your number of html pages and what kind of changes you plan to make. I use a separate CSS sheet for my projects as much as I can. That way you if you need to change something on different documents you just edit the one css doc. I think it is a more organised way. But that's me. Even if you use only a couple of html page for now, your project might grow later and you will be happy to have set up a separate css sheet. Here is two excellent resources: http://www.tizag.com/cssT/ http://www.w3schools.com/css/ Hope it helps! Farcat
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.