Jump to content

IE indents first line?


Lokolo

Recommended Posts

<div id="navigation">	<a href="index.php">Home</a> <br>	<a href="register.php">Register</a> <br>	<a href="faq.php">FAQ</a> <br>	<a href="about.php">About</a> <br></div>

a{  color: black; font-size: 15pt; text-decoration: none;}

The Home is indented within the div on IE (not Firefox). Can anyone tell me why? And how to stop it?(The code below is my CSS for any links)Thanks,

Link to comment
Share on other sites

Browsers have different methods for handling the default padding and margins on elements.The best approach is to use the "star" html hack to set all padding and margins on the page to zero and then adjust them as you need to.

* html { margin:0; padding:0; }ul { margin-left: .5em; padding-left: .5em; } // example only- adjust to suit

Link to comment
Share on other sites

Browsers have different methods for handling the default padding and margins on elements.The best approach is to use the "star" html hack to set all padding and margins on the page to zero and then adjust them as you need to.
* html { margin:0; padding:0; }ul { margin-left: .5em; padding-left: .5em; } // example only- adjust to suit

whats em? (ive always used & or px)
Link to comment
Share on other sites

Ems are a unit that is relative to the physical size of the characters. 1 em is equal to the height of the letter M. They are similar to points, points are fractions of an inch, so a 12pt font should show up exactly the same physical size on a monitor with a resolution of 640x480 as on a same size monitor at 1280x1024.Font measurements are either absolute or relative to monitor resolution. Units like em, pt, inch, cm etc are absolute with respect to the monitor resolution, where they always show up the same size regardless of the resolution, and units like px are relative to the monitor resolution. Units like points and picas are left over from print media and physical typesetting. It seems like pixels are the more logical way to go with internet media because everything else on the page is measured in pixels, like image sizes. You wouldn't make an image that shows up as a percentage of the monitor space, it wouldn't look very good. Vector images may change all that.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...