Jump to content
xisto Community
Sign in to follow this  
mizako

Left Img Padding In Ie do not manage to remove an left padding

Recommended Posts

Hi,
I am creating a Web page for an event we have this week but i am having a wird problem while trying to remove the left padding for some images in IE. In Firefox it shows good.
The link i am speaking about: http://forums.xisto.com/no_longer_exists/

Basically my XHTML code is:

<div id="links"><a href="http://forums.xisto.com/no_longer_exists/ src="images/hafnerriegel.jpg"/></a><a href="http://forums.xisto.com/no_longer_exists/ src="./images/moonsun.jpg"/></a><a href="http://forums.xisto.com/no_longer_exists/ src="./images/grazasmus.jpg"/></a>  <a href="http://http://andreavattovani.com/ src="images/vattovani.jpg"/></a></div>

and CSS is:

#links {margin-top: 25px;margin-left: 50px;}#links a img {border: none;float: left;padding: 0px;}

I thought the padding: 0px inside #links a img will solve the problem.
Any idea?????
Thanks in advanced.

Share this post


Link to post
Share on other sites

Try to make a wrapper with width of 700px and height of 400px. This wrraper should have margin left and right on auto.

So in your container I would put in wrapper.

<div id="Wrapper"><a href="http://forums.xisto.com/no_longer_exists/ src="images/hafnerriegel.jpg"/></a><a href="http://forums.xisto.com/no_longer_exists/ src="./images/moonsun.jpg"/></a><a href="http://forums.xisto.com/no_longer_exists/ src="./images/grazasmus.jpg"/></a>  <a href="http://http://andreavattovani.com/ src="images/vattovani.jpg"/></a></div>

#Wrapper{  max-width:700px;         min-width:700px;  margin-left:auto;   margin-right:auto;        padding: 0px;        margin:0px; }#Wrapper a img {        border: none;        float: left;        padding: 0px;        margin:0px;}

I noticed that 50px padding or margin in Firefox isn't same as 50px padding or margin in Interent Explorer. Internet explorer isn't standard browser :lol:

Share this post


Link to post
Share on other sites

I noticed that 50px padding or margin in Firefox isn't same as 50px padding or margin in Interent Explorer. Internet explorer isn't standard browser :rolleyes:

That's because in FF total width = content width + padding + margin whereas in IE, it's content width - padding - margin, which means you actually end up with a content width smaller than the width you've specified because IE puts the padding & margin on the inside rather than the outside like the specifications say you should.
More detailed explanation is given here.

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.