Borders not changing on hover

This is a discussion on "Borders not changing on hover" within the Web Page Design section. This forum, and the thread "Borders not changing on hover are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 20th, 2007, 17:40
Junior Member
Join Date: Jul 2007
Location: United States of England
Age: 27
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Borders not changing on hover

borders surrounding the image thumbnail should change colour on hover but it doesnt seem to be working and I cant figure it out:

My CSS snippet:
Code: Select all
 #mr-preview {
    float:                     left;
    width:                     100%;
    padding-left:             17px;
    padding-bottom:         10px;
    }
    
#mr-preview ul { 
    list-style-type:         none;
    margin:                 0 15px;
    padding:                0;
    }
    
#mr-preview li { 
    float:                     left;
    width:                     100px;
    height:                 100px;
    margin:                 0 10px 0 0;
    }
    
#mr-preview img { 
    display:                 block;
    width:                     80px;
    height:                 80px;
    margin:                    10px 10px;
    border-thickness:         1px;
    border-width:             thick;    
    border-style:             solid;
    border-color:             #999999;
    }

ul#mr-preview a { 
    border-thickness:         1px;
    border-width:             thick;    
    border-style:             solid;
    border-color:             #999999;
    }
    
ul#mr-preview a:hover {
    border-thickness:         1px;
    border-width:             thick;    
    border-style:             solid;
    border-color:             #FF6600;
    }
My HTML snippet:
Code: Select all
                <span id="mr-preview"><ul>
                <li><a href="/portfolio/testa/"><img src="site_th/th_testa.png" alt="testa"></a></li>
                <li><a href="/portfolio/testb/"><img src="site_th/th_testb.png" alt="testb"></a></li>
                </ul></span>
Reply With Quote

  #2 (permalink)  
Old Aug 20th, 2007, 18:04
Junior Member
Join Date: Jul 2007
Location: United States of England
Age: 27
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Borders not changing on hover

Nevermind, answer is here:

Code: Select all
#mr-preview a:link img { 
    border-thickness:         1px;
    border-width:             thick;    
    border-style:             solid;
    border-color:             #999999;
    }
    
#mr-preview a:hover img {
    border-thickness:         1px;
    border-width:             thick;    
    border-style:             solid;
    border-color:             #FF6600;
    }
Reply With Quote
  #3 (permalink)  
Old Aug 20th, 2007, 19:05
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Borders not changing on hover

Or you can do them shorthand like this:

Code: Select all
#mr-preview a:link img {
border: 1px solid #999;
}

#mr-preview a:hover img {
border: 1px solid #f60;
}
A bit tidier.

Pete.
Reply With Quote
Reply

Tags
border css hover

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
images as borders fuzzee Web Page Design 5 Jun 26th, 2007 12:08
Help with div borders in FF, please? Donny Bahama Web Page Design 12 Apr 10th, 2007 20:09
Overlay two borders Gwayn Web Page Design 4 Feb 1st, 2006 18:19
borders benbacardi Web Page Design 2 Jun 4th, 2004 15:39


All times are GMT. The time now is 03:03.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43