SunQuest
           CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 10th, 2003, 09:09 AM
adrianrowbotham adrianrowbotham is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: London UK
Posts: 3 adrianrowbotham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CSS layout - nav problem

I have a cross-browser compatibility problem with a CSS layout. Basically I have a DIV, with a fixed width and a background colour, used as a Nav bar.

Within this DIV, I have some <A> tags with a class that gives them a padding.

The height of the nav bar is not fixed in pixels because I want it to be accessible so the browser font size controls the size of the bar.

The url is http://www.al-scott.co.uk/nav_prob.html

The page is XHTML 1.0 strict

It works fine in IE and Opera.

On mozilla, the nav bar doesn't pick up the height from the padded links, so it's too small and the content from the DIV below floods into the nav bar.

If anyone knows a way to achieve this effect in a compatible way, then I'll be a very happy man.

It's a bit messy, but most of this is inline CSS, for the purposes of quick debugging.

Many Thanks,
Adrian

Reply With Quote
  #2  
Old November 10th, 2003, 09:29 AM
billybonds billybonds is offline
No. 4
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: UK
Posts: 89 billybonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 32 sec
Reputation Power: 5
hu

tutorial 6 is very good here

and if you follow this it will work fine in al browsers including IE5+

jim
__________________
On a nationwide tour - back next year as champions.

Reply With Quote
  #3  
Old November 10th, 2003, 09:52 AM
adrianrowbotham adrianrowbotham is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: London UK
Posts: 3 adrianrowbotham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the swift reply. I implemented the example you linked above (using a UL) and it partly solved things.

However, it seems that it's not the NAV itself that's the problem, it's how the surrounding divs (above and below) relate to the NAV.

This example: http://www.al-scott.co.uk/nav_prob2.html
uses the UL method exactly as it was in your link, except that I've restricted the width to 450px and changed the bg colour to red to make it obvious what's happening.

If you look at this in Mozilla, you'll see that the content div, below the nav is spilling above the nav too. Is there something wrong with my styles on the surrounding divs ?

Thanks again,
Adrian

Reply With Quote
  #4  
Old November 10th, 2003, 09:56 AM
billybonds billybonds is offline
No. 4
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: UK
Posts: 89 billybonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 32 sec
Reputation Power: 5
The gap above the nav bar can be losy by addind margin-top:0;

e.g.

#navcontainer ul {

Reply With Quote
  #5  
Old November 10th, 2003, 09:59 AM
billybonds billybonds is offline
No. 4
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: UK
Posts: 89 billybonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 32 sec
Reputation Power: 5
The gap above the nav bar can be losy by addind margin-top:0;

e.g.

#navcontainer ul {
blah
margin-top:0;
}

and

.clearboth {
clear: both;
}

in the CSS and putting <br class="clearboth"> immediately beneath the </div> for the nav bar will hopefully solve your prob...

jim

Reply With Quote
  #6  
Old November 10th, 2003, 10:02 AM
adrianrowbotham adrianrowbotham is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: London UK
Posts: 3 adrianrowbotham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why do I get the impression you're much better at this than me?

Thanks very much - I owe you a beer.

Reply With Quote
  #7  
Old November 10th, 2003, 10:14 AM
billybonds billybonds is offline
No. 4
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: UK
Posts: 89 billybonds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 32 sec
Reputation Power: 5
shame about the quality of my spelling though.....

all i know (and i don't know much - i've just built my first CSS site) has been found by trawling the internet and through forums like this - and a lot of fiddling and re-fiddling and.....

you can still buy me the beer next time i'm in town though!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS layout - nav problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway