Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

body { } css code

Status
Not open for further replies.

ThinkGeekness

Technical User
Jan 20, 2003
55
US
I want to put the following in the body {} part of my CSS file.

a:link, a:visited, a:active and p.margin. The only problem is, is that I don't do know to add this code in the body {} part... Whenever I add the brackets it ends the body code.

Thanks
 
you do not need to put them inside the body{} class definitions.

instead add them before or after like so:

body{}
a:link{}
a:visited{}
a:active{}
p.margin{}

Cascading style sheets don't work like HTML. You define all your items in a linear fashion. You do not enclose items inside one another like you do with HTML tags.

Gary Haran
==========================
 
Thanks, if I put:

<link href=&quot;css_name.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>

would that have the CSS apply to the whole document?
 
yup!

[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top