Menu Item Width Not Working

Events happening in the community are now at Drupal community events on www.drupal.org.
jebbushell's picture

Please pardon the newb, but the following menu item styling works except for the width. I'm using Omega3 and Delta but I'm not even confident that they're relevant. Is there a reason why I can't make all the menu items the same width with global.css? And if so how do I overcome it? Thanks.

/*********************  Menu   **************************/
.navigation .menu-227, .menu-434, .menu-482, .menu-445
{
width:100;
border-color: red;
border-style: none solid none none;
border-width: 1px;
}

Comments

100 what?

drew reece's picture

You want to make the width equal to 100 what? Some units may help. eg 100%, 100px, 100em…

It would also depend on if the elements are collapsing because they are inline elements.
Try adding display:block; to see if the width gets applied. Use Firebug in Firefox to see if there are other rules altering the elements.

Presuming that the menu items

samwillc's picture

Presuming that the menu items each have a class (.menu-number) and they are within a div or something called 'navigation', and there are FOUR menu items, try:

/*********************  Menu   **************************/

.navigation {
width: 100%;
}

.navigation .menu-227,
.navigation .menu-434,
.navigation .menu-482,
.navigation .menu-445 {
float: left;
display: block;
padding: 0px;
margin: 0px;
width: 24%; /* not 25% because of the 1px right border */
border-right: 1px solid red;
}

Why not post the html source of the menu in question along with your css. Would make life easier :)

Sam.

Thank you so much. My css

jebbushell's picture

Thank you so much. My css skills were not up to the task. Thanks for the upgrade.

No probs. Keep up the

samwillc's picture

No probs. Keep up the practice.

Check out other sites as well:

http://www.w3schools.com/css/
http://www.cssplay.co.uk/
http://css-tricks.com/

You'll learn some great techniques!

Sam.

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: