Click to See Complete Forum and Search --> : FF and NS aren't counting vertical pixels?


elaurvick
04-04-2006, 08:37 PM
I've finally got some pages converted (more or less) to CSS, with most of it looking good in IE, FF and Netscape. One thing though, is still not working in Firefox and Netscape. Here's an example page:
http://www.enablemobility.com/it_01006.html

The product image, the product name, and the text starting with "Please contact us . . . " should be lined up 220px from the top. Here's the source for all three of them:

<div style="position: absolute; left: 280px; top: 220px; width: 287px; height: 184px;">
<img alt="Masonair Low Air Loss Support Surface" src="Photos/01006.jpg" border="0" /> </div>
<div style="position: absolute; left: 600px; top: 220px; width: 240px;">
<h2> Masonair™ LS-6000 <br /> Low Air Loss <br /> Support Surface </h2> <br /> <br />
<h1> HCPCS Code E0277 </h1> </div>
<div style="position: absolute; left: 850px; top: 220px; width: 120px;">
<h5> Please contact us for delivery outside the continental United States. </h5>
<img src="Tabs/spacer2.gif" alt="" /> <a href="inq_01006.html">
<img alt="Inquiry Link" align="top" src="Tabs/Small Button.gif " border="0" /></a> </div>

This works in IE (all three line up perfectly), but FF and Netscape both insert
some space above the product name, and insert more space before the "Please contact . . " text. Is there a way to fix this?

Fang
04-05-2006, 03:52 AM
All headers <hx> have different margin values depending on the browser.
Set header margins in the css to zero or to individual requirements

elaurvick
04-05-2006, 11:47 PM
Sorry, I should have included this:
<style type="text/css"> <!--
html, body {margin: 0; padding: 0; border: 0;}
h1 {font-size: 18px; font-family: serif; color: #006666; font-weight: normal;}
h2 {font-size: 21px; font-family: serif; color: #006666; font-weight: bold;}
h5 {font-size: 18px; font-family: serif; color: #006666; font-weight: bold;} --> </style>

I believe this is supposed to set all the margins to zero on all browsers. W3c validated both the HTML and CSS, so I don't think I made any errors.

SpectreReturns
04-06-2006, 12:20 AM
...most of it looking good in IE, FF and Netscape. One thing though, is still not working in Firefox...
Erm, am I missing something here?

Fang
04-06-2006, 03:23 AM
html, body {margin: 0; padding: 0; border: 0;}
h1 {font-size: 18px; font-family: serif; color: #006666; font-weight: normal;margin-top: 0;}
h2 {font-size: 21px; font-family: serif; color: #006666; font-weight: bold;margin-top: 0;}
h5 {font-size: 18px; font-family: serif; color: #006666; font-weight: bold;margin-top: 0;}