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!

CSS question..override

Status
Not open for further replies.

linuxnewbi

Technical User
Oct 5, 2004
8
CA
Can you override a background colour set by a CSS?
I just need a white background on one of my pages, and want to continue using the CSS.
 
Yep, no sweat, simply add a style attribute to the body tag of the page you wish to override:
Code:
<body style="background-color:#FFFFFF">

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]
 
To elaborate, this is where CSS gets its name - Cascading Style Sheets:

You can specify style in an external style sheet, which can be overridden by an embedded style sheet placed in the document head, which in turn can be overridden by an inline style placed in the element itself. A simple case of hierarchy. :)

Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top