Jump to content

What's wrong with my CSS?


Guest Liron Tal

Recommended Posts

Guest Liron Tal

Hello,On another page I built I used two Div's: one for the Header and the other on for the Links-bar below the header. I tried to put backgroun color and to modify them using CSS and I couldn't find why I can't see the modifications I've made. I'm using an Explorer 6 browser. I put only the code for the two Div's and not the whole code. So what's wrong?(the horrible colors are just for the test, of course.)Thanks,Liron.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"><html><head><title> TEST PAGE</title><style type="text/css">		body {		margin:10px 10px 10px 10px;		}	#header {		position: absolute;		left:5%;		width:100%;		top:3px;		background:#A9A9A9;		border: dotted 5px;		}	#links 		 {		 position: absolute;		left:5%;		width:100%;		top:100px;		background:Blue;		border: double red 3px;		}</style></head><body>	  <div bgcolor  id="Header">	 			 <h1>  Header Strip</h1>	  </div>	  	  <div id="Links">			 		 <h1>Links</h1>	  </div>	 	 	 	 </body></html>

Link to comment
Share on other sites

<div bgcolor  id="[b][color="red"]H[/color]eader[/b]">  <h1>Header Strip</h1></div><div id="[b][color="red"]L[/color]inks[/b]">  <h1>Links</h1></div>

You have capitalized your id's in your HTML, but didn't in your CSS. You should stick to lower case code to avoid this confusion.

Link to comment
Share on other sites

<div bgcolor  id="Header">

Would you even need "bgcolor" when you're setting the color of the element using the id="header"? Wouldn't that make IE scratch it's pointy little head and not know what to do :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...