Forum Moderators: mack

Message Too Old, No Replies

IE and Netscape differences

         

Harvs

11:40 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



I am having a couple of problems using CSS for my layout which I hope someone can help me with.

Firstly how do I center a <select> (drop down box) in Netscape. I'm using <select align="center> which works in IE. I tried left-margin:auto; right-margin:auto; for Netscape but it doesn't work, any ideas?

Secondly, I have a vertical column of images that I'm using for my navigation bar. I'm using #navigation img{position:relative;left:10px;padding:5px;border:5px;}
which gives me padding in Netscape but in IE the images are right up against each other with no padding. Is there a different way to pad images in IE?

photon

12:28 am on Oct 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An image is an inline element, so padding only applies to left and right. One way around this is to add
display:block;
to your #navigation img CSS.

But I'm surprised that your code is working in Netscape, but isn't in IE; I would have expected it to be the other way around.

Hmmmm....

t_zuk

3:32 am on Oct 12, 2004 (gmt 0)

10+ Year Member



To center objects using CSS use: {margin-left: auto; margin-right:auto}.