Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2007, 08:11 PM   PM User | #1
fro0ty
New to the CF scene

 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
fro0ty is an unknown quantity at this point
Problem with Borders

Hi I am having some difficulties with borders;

http://suheal.googlepages.com/index.html

The border does not display properly with IE6, can anyone help me?
fro0ty is offline   Reply With Quote
Old 01-31-2007, 08:16 PM   PM User | #2
mbannonb
New Coder

 
Join Date: Sep 2004
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
mbannonb is an unknown quantity at this point
Try putting the border style inside the li tag.
mbannonb is offline   Reply With Quote
Old 01-31-2007, 08:23 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello fro0ty,
It looks like IE is cutting off the bottom because your ul is set to height:32px;
The 2px border makes the height 36px.
Try this CSS (I'm just guessing as I do not have IE6 running right now):
Code:
ul#menu {
color: #000000;
width: auto;
height: 36px;
margin: 0;
padding: 0;
list-style: none;
}		
ul#menu li {
font-size: 25px;
height: 36px;
float: left;
display: inline; /* IE 6 */
margin: 0 10px 0 0;
padding: 0;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-31-2007, 10:58 PM   PM User | #4
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,895
Thanks: 5
Thanked 187 Times in 184 Posts
Arbitrator is on a distinguished road
Code:
ul#menu li {
font-size: 25px;
height: 35px;
float: left;
display: inline; /* IE 6 */
margin: 0 10px 0 0;
padding: 0;
}
Inline elements cannot have specified dimensions. Thus, if you want to specify the height, get rid of the display: inline declaration. Fortunately, that declaration doesn’t seem to be doing anything here except wasting space since float: left overrides it; floated elements are block‐level regardless of the display property’s value.

Code:
ul#menu li a {
padding: 2px 5px 5px 5px;
color: #FF0000;
text-decoration: none;
display: inherit;
height: 32px;
}
I’m guessing that this is supposed to be some kind of exploit for Internet Explorer? I would avoid exploits that aren’t forward compatible. Use conditional comments if you have to.

Anyway, the solution seems to be to float the anchor elements to the left. I’d put a border around the div or ul elements though so that you can see the resulting issue: the height is not large enough to accommodate your text, resulting in different cross‐browser appearances between Firefox and Internet Explorer 6. Internet Explorer 7 looks the same as Firefox, however.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:15 PM.


Advertisement
Log in to turn off these ads.