tags:

views:

129

answers:

5

I feel like this is a very basic CSS question:

There seems to be a hidden "margin-top" in my CSS, which shows up in FF and Chrome, but not IE. This is the page: adambailin.com/projects

I want the project title to line up with the image. Each project is in a #project div (thin white border-top). The css for the image is


#project_image
{

 float: left;
 width: 150px;
 height: auto;
 padding: 2px;
 border: solid 1px #7E8AA2;
}

And the css for the description part is


#project_desc
{
 float: right;
 width:425px;
}

Any ideas are greatly appreciated!

+2  A: 

You're using an H4 tag which has it's own margin.

#project_desc h4 { margin-top:0 }
Jonathan Sampson
+1  A: 
#project_desc h4
{
margin-top:0;
}

might help, try installing firebug in firefox, its a web-devs best friend.

runrunraygun
no px need for 0
metal-gear-solid
you are correct sir, edit made :)
runrunraygun
+1  A: 

just use this in css

h4 {margin-top:0;}
metal-gear-solid
A: 

Best plan... use a css reset stylesheet to solve this problem... every browser starts with different base styles.

See this link

Hogan
A: 

Awesome guys, thanks. The h4: margin-top:0 worked perfectly.

Adam Bailin
Adam, don't respond like this. This is not a forum. Instead, click the check beside the best solution you received to accept the answer.
Jonathan Sampson
Yup, vote up all the good answers, tick the best answer.
runrunraygun