Solved

Menu bar location

Posted on 2012-04-09
7
203 Views
Last Modified: 2012-04-09
In the attached webpage I have a table with two columns.

Left narrow columns holds a fixed menu bar (see ID="leftnav").

#leftnav
{
      float: left;
      width: 140px;
      margin: 0;
      position:fixed;
}      

and:

    <div id="leftnav">
        <div id="navcontainer">
          <ul>
            <li><a href="index.htm">home</a></li>
            <li><a href="product.htm">product</a></li>
            <li><a href="designer.htm">designer</a></li>
            <li class="current"><a href="aboutus.htm">about us</a></li>
          </ul>
            </div> <!-- end navcontainer div -->
    </div> <!-- end leftnav div -->

Problem: The vertical fixed menu bar doesn't stay in the left column, How can I make not overlap the second column at its right?

I am trying it with e7.

Thank you.
finalProject.zip
0
Comment
Question by:Mike Eghtebas
  • 4
  • 3
7 Comments
 
LVL 16

Expert Comment

by:s8web
ID: 37824117
Try replacing float:left; with left:0;
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 37824149
s8web,

That put partially on the first column and partially outside to the left, like:


                  1st column                                2nd column
              |                         |                                                                                       |
              |                         |                                                                                       |
              |                         |                                                                                       |
     |                    |            |                                                                                       |
     |    menu     |            |                                                                                       |
     |                    |            |                                                                                       |
     |                    |            |                                                                                       |
             |                         |                                                                                       |
             |                         |                                                                                       |
             |                         |                                                                                       |
             |                         |                                                                                       |
             |                         |                                                                                       |
             |                         |                                                                                       |

 how can I make it relative to the first column?

Thx
0
 
LVL 16

Expert Comment

by:s8web
ID: 37824182
Do you have a link to where your work is running?
0
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!

 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 37824220
It is not uploaded to web. But, it is attached as zip with the original question.
0
 
LVL 16

Accepted Solution

by:
s8web earned 500 total points
ID: 37824302
Got it. This isn't the most elegant solution as it uses a hack (you should probably load it conditionally instead), but try the following changes:

#leftnav 
{
	left:76px;
	left:50px\9;
	width: 140px;
	margin: 0;
	position:fixed;
}

#navcontainer 
{
	padding: 30px;
	border-style: solid;
	border-width: 0px;/*2px;*/
	border-color: #000000;
	width:70%;
}

Open in new window

0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 37824732
Thank you very much.

I have a follow up question about replacing the menu buttons with two list boxes with hard coded data shown below.

this what I have:

[   Home     ]
[   Product  ]
[   designer ]
[   about us ]

This to be relaced with:
________________
| Group 1       |
| Group 2       |
| Group 3       |
| Group 4       |
----------------------
________________
| Sub G 1       |
| Sub G 2       |
| Sub G 3       |
| Sub G 4       |
----------------------

I will post this shortly with a link here.

Thank you.
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 37824797
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

730 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