Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 02-24-2007, 03:47 PM   #1 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 18,004
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
CSS Hover: Border and Background Colours

Desired situation: linked image, padding showing coloured background and border. On hover, the background and border will alter colour.

I've been playing with a piece of code, trying to get the effect to work properly in IE.

HTML Code:
<div id="main"> <a href="#"><img src="../images/grass.gif" border="0" class="highlight" /></a> </div>
Code:
#main a:link img, #main a:active img, #main a:visited img { position: relative; float: left; padding: 5px; background-color: #CAB08A; border: solid 1px #593524; margin: 0 10px 10px 0; } #main a:hover img { background-color: #6B947C; border: solid 1px #095959; }
The :hover applies only to a, as it should. The above code is pristine in FF and Dreamweaver. IE shows the colour change for a height of 10px (twice the padding, as if the image has no height), or not at all if I have more than one of the images occur successively.

Weird, huh? Suggestions welcome.
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-24-2007, 06:40 PM   #2 (permalink)
Inactive
 
Join Date: 02-23-07
Location: USA
Posts: 886
iTrader: 0 / 0%
Nicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of light
Have you tried playing around with putting the styles on just #main a:link instead of #main a:link img?

I tested it and if I keep img out of it, the border appears like it should in IE and still works in firefox.
Nicole is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-24-2007, 08:41 PM   #3 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 18,004
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
Wonderful! I have no idea why that worked, but thank you for your help and experimentation. Here's the result - I didn't check on Opera nor the Mac browsers, but I'm not too concerned about those.

Thanks again.
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-25-2007, 04:53 AM   #4 (permalink)
Inactive
 
Join Date: 02-23-07
Location: USA
Posts: 886
iTrader: 0 / 0%
Nicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of lightNicole is a glorious beacon of light
NP. Glad it worked for ya
Nicole is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB 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
Inkscape colours - this must have a simple answer! yzerfontein Graphic Design Forum 2 04-29-2007 07:59 AM
CSS HOVER Sketch Coding Forum 10 01-08-2006 11:58 AM
Colours!! nedzad Graphic Design Forum 8 11-07-2004 09:20 AM
Colours PaulHarris Marketing Forum 1 05-20-2004 01:53 PM
css image hover sornok Coding Forum 7 01-09-2004 12:29 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:45 PM.
© Copyright 2008 V7 Inc