Jump to content

padding-top not being "displayed" in IE6


Wuhtzu

Recommended Posts

Hey

 

I'm construction a navigation / menu and have problems with IE6 (and IE7, but I'll deal with those later).

 

This is the navigation pulled out of context to simplify the problem:

http://wuhtzu.dk/sandbox/navigation/navigation.html (The problem only shows in IE6)

 

The problem is that in IE6 I can't get proper spacing between the text and the top of the tab as show in #1 and #2. It's like IE6 ignores the padding-top part of padding property:

 

* html #navigation ul li a {
padding: 6px 7px 6px 12px;

#navigation ul li {
padding: 6px 5px 6px 0;

 

#1: Navigation

navigation.jpg

 

#2: Navigation - marked text

navigation_marked_text.jpg

 

#3: Navigation - square tabs

navigation_padding-top_60.jpg

 

I can set the padding-top value to what ever i want: 0, 6px, 50px 100px without the spacing between text and top of the tab changes. However something does change with the padding-top value - it seems to "push" the background images (the ones making the tab slope) upwards. So padding-top: 60px; will make the tabs completely square since the sloping background images are push upwards as shown in #3. So the "element" seems to be extending out of the box some how.

 

Also notice the "height of the li or a element" as shown in #2 where the text has been marked.

 

This is the code:

 

<div id="navigation">
<ul>
	<li><a href="#">Forside</a></li>
	<li id="current">T-Shirts</li>
	<li><a href="#">Blog</a></li>
	<li><a href="#">Information</a></li>
	<li><a href="#">Til kassen</a></li>
</ul>
</div>

 

* html #navigation {
width: 630px;
padding: 0 0 10px 20px;
float: left;
background: #FFFFFF;
font-size: 80%;
}

* html #navigation ul {
text-align: left;
padding: 0 0 20px 0;
}

* html #navigation ul li {
padding: 0 7px 0 0;
border-bottom: none;
display: inline;
background: #FF0068 url("tab_right_norm.gif") no-repeat right top;
}

* html #navigation ul li a {
padding: 6px 7px 6px 12px;
text-decoration: none;
color: #FFFFFF;
background: url("tab_left_norm.gif") no-repeat left top;
font-weight: bold;
}

* html #navigation ul li#current {	
padding: 6px 7px 6px 12px;
background: #FFFFFF;
font-weight: bold;
}

* html #navigation ul li a:hover {
background: url("tab_left_highlight.gif") no-repeat left top;
}

* html #navigation ul li:hover {	
background: #FF0068 url("tab_right_highlight.gif") no-repeat right top;
}

 

Can any of you think of a solution to this problem?

 

Any suggestions will be much appreciated

Wuhtzu

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.