Click to See Complete Forum and Search --> : menubar wrapping


kproc
05-04-2006, 11:56 PM
Hi

below is the css code that controls the location and size of my menu bar

the problem is that on smaller screen resultions it expands the menu bar onto two line on the page, so "contact Me" would be pushed under "home"

how do I prevent this from happening



ul#nav.dhtml{
position:absolute;
/**top:0;
left:0;**/

height:20px;
border:none;
border-bottom:1px solid #C8DCC2;
border-top:1px solid #C8DCC2;
width:100%;
background:#EEFAEA;
margin:0;
padding:0;
list-style-type:none;
font-size:12px;
}

Fang
05-05-2006, 02:00 AM
Try adding white-space: nowrap;
Without the full document this is just guesswork.

WebJoel
05-05-2006, 07:12 PM
ul#nav.dhtml{
position:absolute;
/**top:0;
left:0;**/

height:20px;
border:none;
border-bottom:1px solid #C8DCC2;
border-top:1px solid #C8DCC2;
width:100%;
background:#EEFAEA;
margin:0;
padding:0;
list-style-type:none;
font-size:12px;
}


Out of curioisity, what is this supposed to do? You state NO border, then a bottom-border and a top-border... I image that you will get a bottom & top border as it is stated AFTER the "none", but the redundancy is what I am curious about. :confused:
-J

kproc
05-05-2006, 11:36 PM
I'm not shure, this code is part of a menu bar tutorial that I found on the web

WebJoel
05-06-2006, 09:52 AM
I'm not shure, this code is part of a menu bar tutorial that I found on the web

Oh okay then. But it is redundant to say "none" to a selector (in this case, "border") and then next, create the very same selector and declare values to the aforementioned selector...

If you want to keep the bottom and top margin, you can safely (and correctly) remove the "border:none;" part. It serves no purpose. :-)

kproc
05-09-2006, 08:08 PM
Hi

I have made the changes recommended above but the menubar still wraps to a second line. if I changed or set the postion: would the help. I currently on a computer using a 19in monitor (screen setting 800)and the menu bar is wrapping to the second line

WebJoel
05-09-2006, 08:33 PM
Like Fang said:

Without the full document this is just guesswork.

-Show us the code. All of it. :-)

kproc
05-09-2006, 09:21 PM
below is a link to my web page,

The css files are long I thought that it would be easier to post a link

thank you
http://www.tomorrownextweek.com/

Fang
05-10-2006, 02:23 AM
Wrap a <div> around #nav and give it style="background:#EEFAEA; border-top:1px solid #C8DCC2;"
Then change this:ul#nav.dhtml{
height:20px;
border:none;
width:100% !important; width:940px; min-width:940px;
background:#EEFAEA;
margin:0;
padding:0;
list-style-type:none;
font-size:12px;
white-space: nowrap;
}

kproc
05-10-2006, 08:57 AM
I can't thank you enough for helping me with this. all is fixed