12 replies [Last post]
heathenx
Offline
Regular
Last seen: 13 years 26 weeks ago
Joined: 2005-08-24
Posts: 21
Points: 0

hi everyone.

i have a small problem. first, my personal site is a work in progress. still not finished. it's mostly for learning anyway.

anyway, i have a nav bar right under my banner that renders correctly in ff 1.5 but it gets shortened in ie 6 (white space). can someone look at my site and view in both ff and ie and tell what i need to do.

much appreciated.

http://www.heathenx.org

i can post code if anyone needs it.

ragamuffin
ragamuffin's picture
Offline
Leader
Iowa
Last seen: 11 years 37 weeks ago
Iowa
Joined: 2005-06-02
Posts: 691
Points: 0

nav menu width shortened ie

Hi,

Have you tried 'width:100%' on 'navbar' instead of auto?

- r

heathenx
Offline
Regular
Last seen: 13 years 26 weeks ago
Joined: 2005-08-24
Posts: 21
Points: 0

nav menu width shortened ie

if i try width 100% then it doesn't render correctly in ff and still incorrectly in ie. ie wants to shorten it for some odd reason.

xxphunkadelikxx
xxphunkadelikxx's picture
Offline
Regular
UK
Last seen: 13 years 40 weeks ago
UK
Joined: 2005-12-01
Posts: 29
Points: 0

nav menu width shortened ie

I've done something similar but actually used a list for the navigation, and then assigned equal percentage widths to each list element which then add to 100%.

This example may be what you need.
http://css.maxdesign.com.au/listamatic/horizontal27.htm

heathenx
Offline
Regular
Last seen: 13 years 26 weeks ago
Joined: 2005-08-24
Posts: 21
Points: 0

nav menu width shortened ie

i see. but yours go across the page. i'm trying to keep mine in the container.

xxphunkadelikxx
xxphunkadelikxx's picture
Offline
Regular
UK
Last seen: 13 years 40 weeks ago
UK
Joined: 2005-12-01
Posts: 29
Points: 0

nav menu width shortened ie

However much I'd like to claim ownership of that work, its not actually mine. Its taken from listamatic.

So long as the navigation is held within a container to your required width, the whole thing should fit in all the way across.

kh7
Offline
newbie
Netherlands
Last seen: 14 years 49 weeks ago
Netherlands
Timezone: GMT+1
Joined: 2005-12-21
Posts: 10
Points: 0

nav menu width shortened ie

Try adding a 1px padding to the container. Then you can (according to the Zen of CSS Design) give it a width of 100% (or 99.9% so IE gets it too).
For some reason if you don't do this (something about collapsing borders) the items go out of their container - especially in firefox in my experience. If you got that fixed, perhaps the IE problem will fix itself?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 20 hours 6 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

nav menu width shortened ie

Before getting too tied up in minutia, make your DTD right with the gods. An incomplete doctype causes IE to follow the few rules it does follow in a quirky manner. See http://www.alistapart.com/articles/doctype/ . Use html 4.01 strict. There is no good reason to use a loose DTD on a new document.

That may fix things, or not. It is necessary, though.

I suspect, but have not tested, that after the DTD is right you will need to fool with line-height on the anchors.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

kh7
Offline
newbie
Netherlands
Last seen: 14 years 49 weeks ago
Netherlands
Timezone: GMT+1
Joined: 2005-12-21
Posts: 10
Points: 0

nav menu width shortened ie

kk5st wrote:
Before getting too tied up in minutia, make your DTD right with the gods. An incomplete doctype causes IE to follow the few rules it does follow in a quirky manner. See http://www.alistapart.com/articles/doctype/ . Use html 4.01 strict. There is no good reason to use a loose DTD on a new document.

I don't agree with that - if you are not the only one who is going to update a page, sticking to loose is very smart. Otherwise you will just be cleaning up their code. Also - in loose you get to see what IE5 sees - and there are still enough users out there who use IE5.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

nav menu width shortened ie

Er not strictly true Kh7 you may be mis-understanding the use of Doctypes and standards/quirks a full transitional DTD will switch IE into standards mode whilst leaving IE5 in quirks (the only method of rendering available to it)

It is not really a good idea to promote the use of a transitional DTD just to allow for the eventuality that someone may wish to utilize deprecated elements, it is always the recommendation that a new document is coded in strict from the off, transitional is really to allow pre-coded documents to validate where it's not possible to change the deprecated tags.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 20 hours 6 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

nav menu width shortened ie

Quote:
if you are not the only one who is going to update a page, sticking to loose is very smart. Otherwise you will just be cleaning up their code.

I will repeat: There is no sane reason to use a loose DTD on a new document. If fellow coders don't know how to use valid markup, give'm a thump and let them clean up their own messes. If it's the client you're worried about, use a CMS that works properly.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

kh7
Offline
newbie
Netherlands
Last seen: 14 years 49 weeks ago
Netherlands
Timezone: GMT+1
Joined: 2005-12-21
Posts: 10
Points: 0

nav menu width shortened ie

Well, living in a real world (not the world of CSS-idealism) I still prefer to pull IE6 into quirks mode so that I can be reasonably sure of what IE5 users are seeing. I do feel this aproach is nearing its end though. After writing my earlier commentary I checked the browser-stats on my website and it showed IE5 users only on a few pages (though one page did give 5% users of IE5). So I think that when IE7 hits the market and IE6 goes out the window because people are automatically updating to IE7, I will forget about IE5 altogether. For now though, I'm sticking to transitional mode.

Personally I don't see the problem with align="center" yet, it is not accepted in strict mode. I will probably grow out of this - it is the only old HTML I've coded in more than a year - but it still seems like the easiest solution for centering ads. Adding a style locally is just more typing.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 7 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

nav menu width shortened ie

kh7 wrote:
Well, living in a real world (not the world of CSS-idealism) I still prefer to pull IE6 into quirks mode so that I can be reasonably sure of what IE5 users are seeing.

You shouldn't assume that what is 'real' for you is real for others.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference