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 02-27-2008, 11:00 PM   PM User | #1
NeoPuma
Regular Coder

 
Join Date: Oct 2004
Posts: 104
Thanks: 7
Thanked 2 Times in 2 Posts
NeoPuma is an unknown quantity at this point
Incorrect div length

Hey guys,
I got this web page here: http://neopian.co.uk/coding/bb/
The navigation bar should be 850px long. This is correct in IE. However, in Firefox, it's only as long as the actual menu.

Any suggestions?

Thanks
NeoPuma is offline   Reply With Quote
Old 02-27-2008, 11:05 PM   PM User | #2
harbingerOTV
Senior Coder

 
Join Date: Jan 2005
Location: Memphis, TN
Posts: 1,765
Thanks: 8
Thanked 123 Times in 121 Posts
harbingerOTV will become famous soon enough
your links in the #mainnav are floated. the div is 850px but you cant tell because your not clearing the floats. IE clears automattically (incorrectly) so it looks right in it.

http://www.positioniseverything.net/easyclearing.html
__________________
Stop making things so hard on yourself.
i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis
harbingerOTV is offline   Reply With Quote
Old 02-27-2008, 11:06 PM   PM User | #3
jcdevelopment
Senior Coder

 
jcdevelopment's Avatar
 
Join Date: Oct 2007
Location: Cowboy Nation
Posts: 2,171
Thanks: 173
Thanked 257 Times in 257 Posts
jcdevelopment will become famous soon enoughjcdevelopment will become famous soon enough
take this out of your html

Code:
<div id="mainnav">
	<div class="mainnav_item"><a href="?p=home">Home</a></div>
    <div class="mainnav_item"><a href="?p=about">About Us</a></div>
</div>
make it look like this

Code:
<div id="mainnav">
	<a href="?p=home">Home</a>
    <a href="?p=about">About Us</a>
</div>
that will fix it!!
jcdevelopment is offline   Reply With Quote
Old 02-27-2008, 11:13 PM   PM User | #4
NeoPuma
Regular Coder

 
Join Date: Oct 2004
Posts: 104
Thanks: 7
Thanked 2 Times in 2 Posts
NeoPuma is an unknown quantity at this point
Quote:
Originally Posted by harbingerOTV View Post
your links in the #mainnav are floated. the div is 850px but you cant tell because your not clearing the floats. IE clears automattically (incorrectly) so it looks right in it.

http://www.positioniseverything.net/easyclearing.html
Thanks, but if I remove the float, they end up one below each other. I've had a little look at that link, but using 'clear' doesn't really change any thing either.

Sorry.

@jcdevelopment: That would just remove the effect I'm after?

Last edited by NeoPuma; 02-27-2008 at 11:15 PM..
NeoPuma is offline   Reply With Quote
Old 02-27-2008, 11:19 PM   PM User | #5
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
Hmm, try
Code:
#mainnav {
  height: 25px;
}
Inline-blocks would be useful here, but Firefox < 3 doesn't support it
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 02-27-2008, 11:21 PM   PM User | #6
NeoPuma
Regular Coder

 
Join Date: Oct 2004
Posts: 104
Thanks: 7
Thanked 2 Times in 2 Posts
NeoPuma is an unknown quantity at this point
Quote:
Originally Posted by CyanLight View Post
Hmm, try
Code:
#mainnav {
  height: 25px;
}
Inline-blocks would be useful here, but Firefox < 3 doesn't support it
Thank-you! That worked :P. Such a simple answer ><
NeoPuma 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 03:32 PM.


Advertisement
Log in to turn off these ads.