Putting content next to vertical navigation

user2193632

I know this should be simple, but I can't figure it out. I want to have a vertical navigation menu on the left side of a page with the main content of the page next to it. In this example, I want GOOGLY GOOGLY to display to the right of the menu, not below it. How do I make both columns start at the top? Thank you!

[updated--sorry about the copy-paste problem]

CSS

#vamain
{
 float: left;
 width: 100;
}


#vowelaltnav
{
/*avoid gap after li in ie6 by setting width*/
float: left
width: 130px;
font-size: 11px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
margin-left: 30px;
}

#vowelaltnav ul
{
list-style-type: none;
margin-left: 0;
padding-left: 0;
}

#navlist a
{
display: block;
color: #8592BB;
padding: 8px 0 8px 8px;
}

/*boxmodel hack. http://css-discuss.incutio.com/?page=BoxModelHack SBMH*/
#navlist a { width: 114px; }

#navlist a
{
\width: 130px;
w\idth: 114px;
}

#subnavlist a
{
display: block;
color: #9C9C9C;
padding: 8px 0 8px 8px;
margin-left: 8px;
}

/*boxmodel hack. http://css-discuss.incutio.com/?page=BoxModelHack SBMH*/
#subnavlist a { width: 106px; }

#subnavlist a
{
\width: 122px;
w\idth: 106px;
}

#navlist a, #navlist a:visited,#subnavlist a, #subnavlist a:visited
{
border-left: 8px solid #FFFFFF;
background: #FFFFFF;
color: #9C9C9C;
text-decoration: none;
}

#navlist a:hover, #navlist a#current:hover
{
border-left: 8px solid #CCCCCC;
text-decoration: underline;
}

#subnavlist a:hover, #subnavlist a#subcurrent:hover
{
border-left: 8px solid #CCCCCC;
text-decoration: underline;
}

a#current, a:visited#current, a#subcurrent , a:visited#subcurrent
{
border-left: 8px solid #283D82;
background: #F3F5FC;
color: #283D82;
text-decoration: none;
}

HTML

<div id="vowelaltnav">
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a> 
<ul id="subnavlist">
<li id="subactive"><a href="#" id="subcurrent">Subitem one</a></li>
<li><a href="#">Subitem two</a></li>
<li><a href="#">Subitem three</a></li>
<li><a href="#">Subitem four</a></li>
</ul>

</li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
</ul>
</div>

<div id="vamain">
<p> GOOGLY GOOGLY </p>
</div>
Kodlee Yin

You have plenty of typos in your CSS which contribute to it not working correctly. Here are the ones you need to fix:

Line 3: Width: 100; -> width: 100px;
Line 11: float: left -> float: left;
Line 37, 38, 54, 55: Remove the slashes from width

Fiddle

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to move a table(or other content) next to vertical navigation bar

From Dev

Store content of next page after page navigation

From Dev

Putting imageview on navigation bar

From Dev

li:after in horizontal navigation bar keeps putting its content on a new line

From Dev

Jquery prev/next navigation with show/hide content for custom calendar

From Dev

Putting tab content in the middle

From Dev

Vertical scrollview conflicting with vertical navigation

From Dev

Putting Next 30 days into array

From Dev

Putting content below AppBarLayout in a CoordinatorLayout

From Dev

putting fixed content to flexslider slideshow

From Dev

Putting a file content into an sql query?

From Dev

CSS putting menu inline with the content

From Dev

Putting json content into PHP variable

From Dev

vertical to horizontal navigation

From Dev

change horizontal navigation to vertical

From Dev

vertical navigation with rotated text

From Dev

Customized vertical navigation drawer

From Dev

Vertical Navigation Issues

From Dev

Customized vertical navigation drawer

From Dev

Putting extra in Navigation Drawer Activity Android

From Dev

putting labels, buttons on the navigation bar iOS

From Dev

Div content vertical accordion

From Dev

Vertical content offset for uisegmentcontrol

From Dev

Wrap a Vertical bar with the Content

From Dev

Vertical middle content in div?

From Dev

Putting SVG elements next to each other

From Dev

Putting Divs Next to each other using bootstrap

From Dev

Putting text next to the image css, seems not working

From Dev

Putting two <ul>'s next to each other