CSS Questions

Soldato
Joined
4 Jun 2005
Posts
3,781
I see CSS is the way forward by so many positive comments I heard about it, but I am new to it. Last time I used it I copy and pasted code into forum skins lol :S

I just have two questions:

- Everytime I use css its raw code, im guessing you paste that into your html page?

- Whats with using javascripts with them?


Thanks in advance! :)
 
Associate
Joined
27 Dec 2005
Posts
97
zain said:
I just have two questions:

- Everytime I use css its raw code, im guessing you paste that into your html page?

- Whats with using javascripts with them?


You can put CSS in three places: 1) Seperate CSS file which is referenced from the HTML file. 2) In the head section of the HTML page. 3) Inline using the style attribute of each element. Number 1 is the prefered method. I recomend taking a look at W3 Schools for an introduction to CSS - http://www.w3schools.com

Justin
 
Associate
Joined
30 Aug 2005
Posts
68
With reference to your question (Whats with using javascripts with them?) You can use Javascript to identify which browser and what system its on ie, safari on mac, and then get it to load the appropriate css file. Its a great way to get all your webpages looking exactly the same on different browsers and platforms.

Another thing is don't paste raw code into the html always put it in an external css file, this is good for building up your html code into divs and classes and then using css for the presentational side of things as thats its main purpose.
 
Back
Top Bottom