Solved

CSS Menu - Stop it from going to next line

Posted on 2008-10-03
5
744 Views
Last Modified: 2012-05-05
Hi,

I have a CSS horizontal menu which works great. The problem is when I resize the menu it sends the content of the menu to the next line. Is there a way of preventing this from happening. To see what I mean download this menu to your desktop and then resize your browser. The background of the menu stays where it is suppose to but the text goes to the next line..

http://exploding-boy.com/images/cssmenus/menus.html

Many Thanks
0
Comment
Question by:brookba
  • 2
  • 2
5 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22639763
So tell me, what is the browser supposed to do if the screen size is LESS than the text to fit on one line?  Is is supposed to make a smaller font -- or is it supposed to Chop off the right side of our menu.  Tell me, what do you want the browser to do if the screen size is LESS WIDTH than the text you want to display??

When you answer that question and know what you want the browser to do, we can give an solution.
0
 

Author Comment

by:brookba
ID: 22640054
oh sorry... the same way the experts exchange menu works. When you resize the browser it gets chopped off.. thanks
0
 
LVL 42

Expert Comment

by:David S.
ID: 22640191
Set a minimum width on an ancestor (e.g. parent) element.

IE6 doesn't support the min-width property though.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22641444
EE is just using a fixed width layout -- when you slide the right side in, the layout stays the same.  You can do this just by specifying the width of all DIVs on your page, or the width of tables, etc.
0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 22641616
The "Premium" skin is fixed width while the "Expert" skin is a constrained fluid layout. The right column of it is fixed width though.

This is the rule that sets the min-width:

#outerWrap { min-width:968px; }
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now