Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Aug 2009
    Posts
    407
    Thanks
    119
    Thanked 0 Times in 0 Posts

    menu alignment trouble

    stupid question, but i cannot for the life of me figure out what element to apply a text-align:right or a float:right to in order to get the top navigation menu to align to the right side of the screen, and not the left, on this site

    please advise. thanks in advance!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello sixrfan,
    Your loading two style.css files, not really a problem but it does make it more difficult to debug ... especially when you style .menu from both of them.

    Give this a try -
    Code:
    #access .menu-header li,
    div.menu li {
    	float: right;
    	position: relative;
    }
    You'll want to re-order your li's then...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    sixrfan (12-26-2010)

  • #3
    Regular Coder
    Join Date
    Oct 2006
    Posts
    181
    Thanks
    1
    Thanked 6 Times in 6 Posts
    is there a type of float centre or something for the navbar at http://scalamoosh.com ???
    Quote Originally Posted by Excavator
    write it for firefox then hack it for IE

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    No, there is no such thing as float center.

    You can center that nav ul two different ways.
    One would be to give it a width and margin: 0 auto; ...like this -
    To center an element you need three things:
    1. a valid DocType
    2. an element with a width
    3. that elements right/left margins set to auto
    The other way would be using percentages like this example.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Shoot2Kill View Post
    is there a type of float centre or something for the navbar at http://scalamoosh.com ???
    you can do this by giving this selector "header nav ul" in your style.css
    an style
    Code:
    text-align:center

  • #6
    Regular Coder
    Join Date
    Aug 2009
    Posts
    407
    Thanks
    119
    Thanked 0 Times in 0 Posts
    the float:right worked. thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •