Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3494398
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:00:04+00:00 2026-05-18T12:00:04+00:00

new to css. trying to create horizonal and vertical menus with list. my vertical

  • 0

new to css. trying to create horizonal and vertical menus with list.
my vertical list under the horizontal one goest to the next line, but it starts off where the horizontal menu ends like an indention tab.
how do i get the vertical menu to go far left?

css and html code:

ul {
  margin-top: 0px;
  margin-right: 0px;
  margin-bottom: 1.2em;
  margin-left: 20px;
  list-style-type: none;
}
li {
  background-image: url(../images/listimage.jpg);
  background-repeat: no-repeat;
  background-position: 0% 50%;
  margin: 0px;
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 0px;
  padding-left: 16px;
}
.clearfloat {clear:both;
  height:0;
  font-size: 1px;
  line-height: 0px;
}
#horizontal_M  {
  color: #FFFFFF;
  background-color: #272910;
  background-image: url(../images/btn.jpg);
  background-repeat: repeat-x;
  background-position: bottom;
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: #FFFFFF;
  width: 100%;
  height: 31px;
}
#vertical_M   {
  background-color: #EEF0E3;
  background-image: url(../images/sidemenubg.jpg);
  background-repeat: repeat-x;
  background-position: bottom;
  margin-top: 0px;
  margin-right: 15px;
  margin-bottom: 0px;
  margin-left: 15px;
  padding-top: 20px;
  padding-right: 0px;
  padding-bottom: 14px;
  padding-left: 0px;
  float: left;
  width: 200px;
}
<div id="horizontal_M">
  <ul>
    <br class="clearfloat" />

    <li><a href="index.html">link 1/a></li>
    <li><a href="index.html">link 2</a></li>
    <li><a href="index.html">link 3</a></li>
    <li><a href="index.html">link 4</a></li>
  </ul>

</div>

<div id="vertical_M">
  <ul>

    <li><a href="index.html">link 1</a></li>
    <li><a href="index.html">link 2</a></li>
    <li><a href="index.html">link 3</a></li>
    <li><a href="index.html">link 4</a></li>
  </ul> 
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:00:04+00:00Added an answer on May 18, 2026 at 12:00 pm

    You don’t need the container divs. Can style the <ul> instead.

    Horizontal <li> should be float: left;

    Vertical <ul> set clear:left;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying create a new css for shaping my detailsview. But i couldn't
I am new to CSS and I am trying to create something unusual. My
I am trying to create a new html component using javascript and CSS. The
I trying to create an HTML/CSS/JavaScript based list manager. I'm using text input fields
So this is new, I'm trying to create clean CSS, here's my code example:
New to php. Trying to create a list of images with text in a
I'm new to CSS and I'm trying to read the code that comes with
I am trying out twitter bootstrap and am new to CSS/HTML. Here's my simple
I am new to Zkoss and i need to create completely new css theme
Hi I am new to css media queries so please bear with me, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.