Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31380
    foxydl
    Member

    I’m pretty new for web designing, And I wanna know, How to position Navigation Bar which created using un-orderd list and image replacement, to center (with every screen resolutions)?
    Thanks! :)

    #63923
    AndrewHipp
    Participant

    If you want to center something you can use margin:auto.

    I made an example for you:
    http://www.cssdesk.com/LM8Aw

    This requires a width however. With navigation if you want to center it there will be issues in the future if you try to add more links.

    Hope that helped!

    #63841
    SmashDeveloper
    Participant

    You could use the

    or easily make it like this (the recommended way):

    HTML



    CSS


    #nav{
    margin: 0 auto;
    text-alignment: center;
    }

    #nav ul, li{
    display:inline;
    }

    #nav ul{
    list-style-type: none;
    }

    #63851
    TT_Mark
    Member

    @SmashDeveloper

    Why even mention the

    tag? It’s obsolete and is not even part of the HTML5 spec

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.