Placement of CSS Code

adx

New Member
It can also go inside other elements by using the style="" attribute, like for instance <div style="something: etc">.
 

conor

New Member
It can also go inside other elements by using the style="" attribute, like for instance <div style="something: etc">.

Is that valid XHTML though? I think that that has thrown up errors for me before...
 

mezangath

New Member
It's not prefered to place the CSS attributes in the header, create a document named like style.css, then place:

Code:
<link href="style.css" rel="stylesheet" type="text/css" />

In the <head> of the page.

In style.css you just use pure CSS. It easier to edit and if you have many HTML/PHP files, you'll find that you can apply the same style sheet to all your other documents ;)
 
Top