473,786 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

css vertical navbar spacing browser compatibility

I made a vertical navbar using a background image for the buttons. When
I tested under FF or Opera, it looks fine, with the buttons touching
vertically. However, in IE6 the buttons are spaced apart vertically by
the amount of padding I used to vertically center the text on the
button. IE7 has vertical spacing also, but only a small amount.

Any suggestions on how to handle this difference?

To see the buttons with the padding,
www.powell-electric.com/nav_pad.html
and without at,
www.powell-electric.com/nav_nopad.html

The stylesheet with the padding is:
#navcontainer ul {
list-style-type: none;
text-align: left;
padding: 0;
margin: 0;
}

#navcontainer ul li {
background: transparent url(state_up.gi f) top left no-repeat;
width: 130px;
height: 32px;
}
#navcontainer ul li a {
text-align:center;
padding-top: 7px;
font: normal 12px "Lucida Grande", "Lucida Sans Unicode", verdana,
lucida, sans-serif;
text-decoration: none;
display: block;
height: 100%;
color: #00c;
}

Jun 18 '06 #1
2 3222
I figured that if I reduced the height of the anchor element to 25px,
that the 7px plus that set the element's height to 32px.

Why does IE(6&7) both have a margin of 1px vertical space between the
buttons, whereas FF and Opera do not?

TIA, larzeb

Jun 18 '06 #2
To further the education of mankind, la********@yaho o.com vouchsafed:
I figured that if I reduced the height of the anchor element to 25px,
that the 7px plus that set the element's height to 32px.

Why does IE(6&7) both have a margin of 1px vertical space between the
buttons, whereas FF and Opera do not?


Actually, on both your examples I saw no difference between ie6 and ff.

--
Neredbojias
Infinity has its limits.
Jun 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
30912
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
13
77697
by: Dave | last post by:
Hi, what Property and Values are used to space out further from one another the items in a list (assuming it's possible)? The default presentation is a bit "bunched up" for me. Thanks, Dave
5
12350
by: Applebrown | last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple layout, and I'm finding myself stuck with small white space in between my images where I planned for the graphics to be stacked up right on top of one another. Here's the simple vertical layout: width is 640px, centered with a CSS border. I'd...
38
24009
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with font) Woudl some of the space character in unicode work? (my html files uses unicode) Xah
0
2261
by: Old Wolf | last post by:
I have a site that I laid out with tables, and lots of grotty hacks and lots of markup generated by client-side javascript. I'm in the process of converting it to "nice" CSS code but have got stuck on a couple of issues. My pages are going to be used in a situation with fixed viewport (1024x768) and Mozilla browser -- so there are no resizing / browser issues to worry about. My basic page layout is:
5
8953
by: Goldy | last post by:
Hello, w/ code like this: <table border="0" cellspacing="0" cellpadding="0"> <asp:Repeater runat="server" id="op"> <HeaderTemplate></HeaderTemplate> <ItemTemplate> <tr> <td class="label-item" align="left"> <asp:Label runat="server" id="b1" />
18
7948
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I would like it far right centered vertically. #test { width: 100%; height: 55px; margin: 0 0 0 0;
7
4652
by: Xah Lee | last post by:
Look at this page http://xahlee.org/emacs/wrap-url.html Look at it in Firebox, look at it in Safari, in Opera, and look at it in Microsoft Internet Explorer. The only fucked up case, is Firefox. Namely, that it does not respect the font used when dealing with «width:80ex». The way to test this visually, is by this code: <pre style="border:thin black solid;
1
6164
by: dave8421 | last post by:
Hi, I have a (strict) html document with the following portion: <ul> <li><img alt="" src="images/image1.jpg" /></li> <li><img alt="" src="images/image2.jpg" /></li> <li><img alt="" src="images/image3.jpg" /></li> <li><img alt="" src="images/image4.jpg" /></li> <li><img alt="" src="images/image5.jpg" /></li>
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.