...

View Full Version : FF / IE div layout differences



dirksmith
11-26-2005, 07:28 PM
Hi

I'm having a problem with IE and FF div positioning

The usual thing that both browsers are positioning my divs differently - with FF adding additional space after a </p> at the bottom of the div - and also additional space at the top.

Grateful for a solution - 1 if possible that I can apply universally across the whole style sheet rather than fiddling with the margins / paddings in individual divs.

You can see the problem here:
http://www.veinremoval-cornwall.com/index5.htm

The divs are positioned as absolutes - but held in a container positioned as a relative to ensure constant central screen positioning.

This is my 2nd full on CSS site and I keep coming up against this problem - grateful for any help available on this.

Many thanx

Dirk


The css:

#index_lefttop{
position:absolute;
left: 17px;
top: 218px;
height:212px;
width:448px;
margin:0px;
padding:0px;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #009999;
}

the html:

<div id="index_lefttop">
<p class="quote"> <img src="source_docs/veinwave.jpg" width="200" height="91">"The very latest and most effective treatment available for red vein removal"</p>
<p class="quotetag"> Mr B.M. Newman M.D., F.R.C.S. Consultant Surgeon</p>
<p>Veinwave is the latest revolutionary new technology for spider vein removal as well as several other conditions.</p>
<p>Veinwave can be used on any part of the body, face, legs, feet and all other parts of the body. Veinwave is for men and women.</p>
<p>For more information: FAQ</p>
</div>

_Aerospace_Eng_
11-26-2005, 07:33 PM
A paragraph has a default margin and its not the same in all browsers, you could do something like

p {
margin:5px;
padding:0;
}
or the "global reset"

* {
margin:0;
padding:0;
}
Put that at the top of your CSS, all padding and margin will be set to 0 on all elements.

dirksmith
11-26-2005, 08:43 PM
thanx for that.

This is also useful for the same issue:

http://www.complexspiral.com/publications/uncollapsing-margins/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum