Expand Cut Tags

No cut tags
ocelot: (Default)
[personal profile] ocelot
Dear LazyWeb,

I want to make it so that all pictures of a certain class have the same text in their title attribute. Specifically, I want all thumbnails to say "Click here for larger image" when you put the mouse over them, which would normally be accomplished via the title attribute. How would I do this, preferably using CSS, but whatever works?

This is not working:

img.tpic
{
position: relative;
top: -8px;
background-image: url('images/imgbg.gif');
height: 130px;
padding: 10px;
title: "Click here for larger image";
}

I am embarrased to admit how long I have been trying to figure this out.

Thank you!

Date: 2008-06-13 10:26 pm (UTC)
From: [identity profile] jtersesk.livejournal.com
I've been Googling around, and I don't think it's possible to do it with CSS. CSS is meant for style, not content, and the title/alt tag is content. I found this page which seems to agree. Looks like he has a suggestion that might work for you, but I didn't read the whole thing.

Date: 2008-06-13 10:27 pm (UTC)
From: [identity profile] jtersesk.livejournal.com
You could probably create a JavaScript (or find someone to create it for you) that would identify all images of a certain class and add the title information directly on the page, though.

Profile

ocelot: (Default)
ocelot

April 2011

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627 282930

Most Popular Tags

Style Credit

Page generated Jan. 30th, 2026 02:19 pm
Powered by Dreamwidth Studios