|
| |
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
Clickable Div - 9/9/2008 9:12:18
Hi all, This is related to another post of mine, but not quite the same. I have the following code: <a href="searchlink.asp?f=1" class="linkstyle" style="display:block;cursor:hand;"> <div class="linkblock"> <img src="../images/listings/image.jpg"> <div class="linkblockheader"> Homes</div> <div style="clear:left;"></div> </div></a> When I mouseover the image within the linkblock div, although the cursor displays a hand (because I've told it to), I cannot activate the link. Everywhere else in the linkblock div, the link works except for over the image. Is there anyway to accomplish what I'm trying to do (which is basically make the whole linkblock div highlight on rollover, and also click on anywhere within the linkblock div - including the image - to advance to the next page)? I obviously can't add a link to the image, because it would create overlapping <a> tags. Carrie
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: Clickable Div - 9/9/2008 9:44:50
Thanks Texas, Yes, I see that I should take the display:block out - I may have moved it from somewhere else while testing. If viewed in IE7 you can see the effect - I don't know about other browsers yet. Anyhow, view the link and mouseover the image - can't click, can you? http://www.cbcoastrealty.com/search/listings3.asp I want the whole div block to be a link with rollover effects, basically. I have seen the effect before, but can't recall exactly where at the moment, and can't recall if an image was included within the highlighted area. Is what I'm trying to do possible? If not, is ther another way to accomplish this? Carrie
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: Clickable Div - 9/9/2008 13:29:15
Texas, Sorry I didn't see the code in your first post. Use the image as a background image - good idea. I should probably try to use that inline since I have 8 different images. I'll let you know how it goes. Thanks, Carrie
< Message edited by carrie -- 9/9/2008 13:52:36 >
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: Clickable Div - 9/9/2008 14:23:19
Texas, Thanks - it worked and actually simplified the code. One question: I read to use ids in css once, and classes several times, but the code you sent had the linkblock as an id. Does it matter? Thanks, Carrie
|
|
|
|
d a v e
Posts: 4348 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Clickable Div - 9/9/2008 14:30:14
quote:
ORIGINAL: TexasWebDevelopers quote:
TEST PAGE http://www.littleblueplane.com/test/hoverdivtest.html Doesn't work in IE8 Beta 2 works for me in ie8 beta 2 maybe the British version is superior? :)
_____________________________
David Prescott Gekko web design
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: Clickable Div - 9/9/2008 16:47:55
Tex, Sort of, I was asking should it be # or . -- id or class. I thought you use class if you have many instances, and id for only one instance - just wanted your thoughts on that. Seems to be working as id even though it's repeated 8 different times. Carrie
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: Clickable Div - 9/10/2008 8:57:41
Tailslide, No, I know it looks like a list in the post, but it's not quite like that. Here's the page: http://www.cbcoastrealty.com/search/listings.asp I'm going to change the #linkblock to .linkblock, since there are multiple instances - and then look for something to use in place of the h1 tags in light of your post. Thanks, Carrie
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|