SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: [CSS] Problem with Alignment and Underline

  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [CSS] Problem with Alignment and Underline

    Hi,

    I am in the process of building my first css page, but I've got a problem.

    URL

    The Menu is supposed to be align=right, and not underlined! I don't know how this came, but i don't want it underlined.

    Thanks

  2. #2
    SitePoint Addict webaddictz's Avatar
    Join Date
    Feb 2006
    Location
    Netherlands
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kanexpo View Post
    Hi,

    I am in the process of building my first css page, but I've got a problem.

    URL

    The Menu is supposed to be align=right, and not underlined! I don't know how this came, but i don't want it underlined.

    Thanks
    You could put 'text-decoration: none;' on your a elements.

  3. #3
    SitePoint Addict SitePoint Award Recipient
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You really shouldn't use a menu within a <h1> title. Your H1 has text-align:right, so that's probably why it's doing that.

    You're also mixing CSS with HTML aligns, so it's going to get a little confusing! Scrap the HTML ones and do it all in CSS.
    Optimalworks Ltd web design and IT consultancy, Devon UK
    http://www.optimalworks.net/

    We produce elegant, standards-based, accessible websites:
    Valid XHTML, CSS, JavaScript, DOM scripting, AJAX, PHP, .NET

  4. #4
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply,

    im quite new to css, sorry if i ask so much but should i do it like this?

    a {color: #ffffff;}
    a:visited {color:#ffffff;}
    a:hover {color: #000066;}
    a:active { color:#000000;}
    a:text-decoration: none;

    or

    a {color: #ffffff;}
    a:visited {color:#ffffff;}
    a:hover {color: #000066;}
    a:active { color:#000000;}
    text-decoration: none;

    cheers

  5. #5
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i dont think i could manage doing everything in css only. the h1 did the trick its alinged to left now, but the bar became smaller..

  6. #6
    padawan silver trophy
    SitePoint Award Recipient markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,014
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kanexpo View Post
    thanks for the reply,

    im quite new to css, sorry if i ask so much but should i do it like this?

    a {color: #ffffff;}
    a:visited {color:#ffffff;}
    a:hover {color: #000066;}
    a:active { color:#000000;}
    a:text-decoration: none;

    or

    a {color: #ffffff;}
    a:visited {color:#ffffff;}
    a:hover {color: #000066;}
    a:active { color:#000000;}
    text-decoration: none;

    cheers
    Hi,

    You would want to do it like
    Code:
    a {color: #ffffff; text-decoration: none;}
    a:visited {color:#ffffff;}
    a:hover {color: #000066;}
    a:active { color:#000000;}

Bookmarks

Posting Permissions

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