| | |
Image links and CSS
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2006
Posts: 33
Reputation:
Solved Threads: 0
Hey, Im trying to do a CSS rollover border color change for my images (which are links). Problem is, the border only partly covers the image, going about half way up the image on the sides, and not covering the top at all.
Id post some code, but considering the easy nature of what im trying to do i didnt think it would be necessary.
Thanks for your help,
-ryan
Id post some code, but considering the easy nature of what im trying to do i didnt think it would be necessary.
Thanks for your help,
-ryan
...and
didn't work?
HTML and CSS Syntax (Toggle Plain Text)
a:link img, a:visited img { border: 1px solid #000000 } a:hover img { border: 1px solid #FF0000 }
didn't work?
•
•
Join Date: Jun 2006
Posts: 33
Reputation:
Solved Threads: 0
Yes, this works. Thanks for the help.
I saw something reference the "img" part in CSS, but i couldnt apply it to work correctly in my situation.
Sweet, and since i wanted to name it, i came up with this.
I saw something reference the "img" part in CSS, but i couldnt apply it to work correctly in my situation.
Sweet, and since i wanted to name it, i came up with this.
HTML and CSS Syntax (Toggle Plain Text)
#car:link img, #car:visited img { border: 1px solid #000000 } #car:hover img { border: 1px solid #FF0000 }
•
•
Join Date: Jun 2006
Posts: 33
Reputation:
Solved Threads: 0
You guessed it. In I.E. the image links are the lighter gray, and do not change colors. The image links at the top of my page (this page is included by a index.php - for example) are showing in the purple "visited" color as the would do so normally. I think i can solve the latter of those two problems, but what do you think about correcting the first?
If you've named the image, try
HTML and CSS Syntax (Toggle Plain Text)
a:link img#car, a:visited img#car { border: 1px solid #000000 } a:hover img#car { border: 1px solid #FF0000 }
ok...on my photo gallery page (http://www.frankjamison.com/gallery/), I use a combination of css and javascript to achieve this effect.
[html]
<img src="image.jpg'" class="rolloverOff" onMouseOver="this.className='rolloverOn'" onmouseout="this.className='rolloverOff'" /></a>
[/html]
[html]
<img src="image.jpg'" class="rolloverOff" onMouseOver="this.className='rolloverOn'" onmouseout="this.className='rolloverOff'" /></a>
[/html]
HTML and CSS Syntax (Toggle Plain Text)
.rolloverOff { border: 1px solid #999999; } .rolloverOn { border: 1px solid #FFFFFF; }
Last edited by FC Jamison; Sep 14th, 2006 at 9:58 pm.
![]() |
Similar Threads
- CSS hover on individual link (li) ??? (HTML and CSS)
- CSS scrollbar ??? (JavaScript / DHTML / AJAX)
- CSS help with image links (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Need help with IE6 (simple?) problem
- Next Thread: A strange problem...
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





