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 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    li border change on hover?

    I have a horizontal list with a border on each list. how can I chane the border color when someone hovers on a list?. i tried the below but it does not work.


    Code:
    ul li  {
    
        display:block;
        width:180px;
        height:200px;
        margin:5px; 
        padding:5px;
        text-align:center;
        background-position:0 0;
        border:5px solid #E3E3E3;
    }
    
    
    ul li{
    
        float:left;
    }
    
    ul li hover {   border:5px solid red;}

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    341
    Thanks
    3
    Thanked 36 Times in 36 Posts
    Code:
    ul li hover {   border:5px solid red;}
    should be:
    Code:
    ul li:hover {   border:5px solid red;}
    Frank

    How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.


  •  

    Posting Permissions

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