Web Analytics Made Easy -
StatCounter CSS alignment help - CodingForum

Announcement

Collapse
No announcement yet.

CSS alignment help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS alignment help

    I would like the top nav text to be centered but still with the same look it has now. Here is the css stylesheet relating to this:


    #topnav{

    padding-top:200px;

    }

    #topnav ul{

    margin:0px 0px 0px 0px;
    }

    #topnav li{

    list-style:none;

    display:inline;

    font-weight:bold;
    }

    #topnav a{

    float:left;

    display:block;

    text-indent:14px;

    }

    What should I change?

  • #2
    do u have a link?

    margin:0 auto;

    will help u center block level elements.
    ._-zro
    [email protected]
    zro.redtv.org

    "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
    -Tim Berners-Lee, Weaving the Web, 1999

    Comment


    • #3
      link is http://www.madbum.com

      I added in that code and it didn't work

      Comment


      • #4
        If its just the text, text-align: center;
        I lost my signature, have you seen it?
        I have the power to erase you...

        Comment


        • #5
          Tried it, wouldn't work for some reason.

          Comment


          • #6
            You don't need the display:block if it's just text. I'm also a little confused why you have "text-decoration: none" in your CSS for links but <u /> tags around your links in the menu.

            Anyhoo... start off with these basic styles...

            Code:
            li	{
            		list-style: none;
            		display: inline;
            		padding: 0 1em;
            		}
            	
            	ul	{
            		text-align: center;
            		}
            and add your font styles and padding and such.
            drums | web

            Comment


            • #7
              Still didn't work. I'll just hope my coder comes online sometime. I don't know why nothing is working.

              Comment


              • #8
                Are you even trying? What didn't work? What code did you use?

                Code:
                #topnav ul{
                margin:0px 0px 0px 0px;
                text-align: center;
                }
                
                #topnav li{
                list-style:none;
                display:inline;
                font-weight:bold;
                padding: 0 1em;
                }
                Then delete this:
                Code:
                [COLOR=Red]#topnav a{
                float:left;
                text-indent:14px;
                display:block;
                }[/COLOR]
                It works just fine. And don't post a follow up question unless there's some code to back it up.
                drums | web

                Comment


                • #9
                  Yes, I am trying. I put in the code and it looks fine in ie but check firefox. It's offset to the right for some reason

                  Comment


                  • #10
                    Let's see the code.

                    Edit:
                    Never mind, I saw the page online. Your list has default padding added to it. Get rid of the padding.
                    Last edited by rmedek; Aug 2, 2005, 02:41 PM.
                    drums | web

                    Comment


                    • #11
                      Ah, where is the default padding at?

                      Comment


                      • #12
                        is this wut yr tryin to do?


                        Code:
                        #topnav{
                        padding-top:200px;
                        text-align:center;
                        }
                        
                        #topnav ul{
                        margin:0 auto;
                        text-align: center;
                        }
                        
                        #topnav li{
                        list-style:none;
                        display:inline;
                        font-weight:bold;
                        padding: 0 1em 0 0 ;
                        margin:0;
                        position:relative;
                        left:-1em;
                        }
                        Last edited by [email protected]; Aug 2, 2005, 06:34 PM.
                        ._-zro
                        [email protected]
                        zro.redtv.org

                        "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
                        -Tim Berners-Lee, Weaving the Web, 1999

                        Comment


                        • #13
                          no, we have that solved. He said there is default padding somewhere.

                          Comment

                          Working...
                          X