how to make a basic horizonal css menu part 1

Discussion in 'Web Design & Programming' started by roy92, Oct 28, 2007.

  1. roy92

    roy92 CSS HAXOR

    Likes Received:
    0
    Trophy Points:
    0
    Menus! these little suckers used to drive me nuts when I just started out with CSS, but really, they are quite easy to learn. I just want to show you guys how easy it is to make a CSS menu, so let's get cracking!

    There will be a couple (yes, just two) of HTML codes we will be using and use CSS to style it up, the two tags are: <ul> and <li>.

    <ul> is the abbreviation of unordered list. This tag specifies what kind of "list" will be shown. For example, the <ul> tags will output lists like this:
    • list 1
    • list 2
    • list 3

    While the other type of list type is <ol> which stands for ordered lists, this type of list will output this:

    1. list 1
    2. list 2
    3. list 3
    . Because <ul> is more common, and we won't even use bullets for this tutorial, we will use <ul>.

    The next HTML tag needed for a menu is this tag - <li> these tags go before each item we want to add in the list, which goes in between the <ul></ul> tags. Anything that goes in between the <li> tag </li> will be considered as a list item.

    Example:
    Code:
    <ul>
    <li>list 1</li>
    <li>list 2</li>
    <li>list 3</li>
    </ul>
    
    remember, we have to close off each <li> tag after each list item with a </li> and to close off the <ul> tag just after the last list item with a </ul>


    Now we know the structure of the HTML tags, we can proceed to style it up using CSS.

    Stay tuned for the part 2 of this tutorial
     
  2. edijs

    edijs Programmer

    Likes Received:
    9
    Trophy Points:
    38
    I'll give a great lead for every CSS menu supporter - CSS Play
     

Share This Page