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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Underline on CSS

    Hi, I am just wondering, is it possible to change the thickness & colour of an underline? I want my text to be "Home" with a 3 px orange underline under the word home, is this possible?

  • #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 DaleCee,
    You are describing a bottom border. Have a look at http://www.w3schools.com/css/css_border.asp
    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

  • #3
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts
    use border-bottom as your underline then you can define it to be whatever colour and thickness you require. To move it away from the word use padding-bottom.

    Apologies for not refreshing before I answered.
    Last edited by Donkey; 04-04-2011 at 05:39 PM. Reason: To explain why I answered a question that had already been answered.
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band


  •  

    Posting Permissions

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