?
Solved

Adjust size of boxes in horizontial menu

Posted on 2013-06-19
5
Medium Priority
?
211 Views
Last Modified: 2013-06-19
How can i increase the width of these boxes in a horizontal menu?

http://roofgenius.com/RoofCalcWriter/test.asp
0
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39258600
Just change the padding

fyi, you have padding:8px;  AND padding-top:8px;.  The first means padding all around.  This will help you understand the box model and padding/margin.  http://www.w3schools.com/css/css_boxmodel.asp  

I would change your padding:8px; line to
padding-top:8px;
padding-bottom:8px;
padding-left:10px;
padding-right:10px;

That will keep the top/bottom the same and add space to the left and right.

.menu_table_nav #horzlist a
{
      width:100px;
      height: 20px;
      padding:8px;
      padding-top: 8px;
      text-decoration:none;
      font:10px Verdana, Geneva, sans-serif;
      font-weight: 600;
      color:#1C4FFF;
      text-align: center;
      background-color:  #f0f0f0;
      border: 1px solid #0066ff;
}
0
 
LVL 6

Expert Comment

by:yats
ID: 39258817
try using display:block property at a:href level.
0
 

Author Comment

by:isnoend2001
ID: 39259406
Thanks padas, but the boxes width depends on the content, I am trying to make them all the same width.

Thanks yats, don't know what you mean
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39259520
Please look at this sample  http://jsbin.com/olozuy/1/edit

It's very simple and I think you have made this more complex then it needs to be.  Start over and rebuild this.  

css
ul.x li{
  display:inline-block;
  width:100px;
  height:30px;
  background-color:red;
  text-align:center;
  padding-top:10px;
  
}

Open in new window

html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div id="container">
    <ul class="x">
      <li>one</li>
      <li>one two</li>
      <li>one two three</li>
    </ul>
    
  </div>
</body>
</html>

Open in new window

Lot's of samples here http://css.maxdesign.com.au/listamatic/

Make the box styled by the li tag.  The only thing you need to style the "li a" tags together for will be the text to prevent an underline and hover.
0
 

Author Closing Comment

by:isnoend2001
ID: 39259605
Thanks I will restyle your boxes, hopefully i can get the boxes to center
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 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