| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Accurate
Join Date: Feb 2003
Location: UK
Posts: 1,311
|
I have a few paragraphs on a page that I want to underline when the mouse goes over them... I know this can be done in CSS, but I only want this effect to happen to a few paragraphs.. is there any code I can insert around the selected text to make this happen? (the text isn't image, its actual text) Many thanks! decent web hosting - www.balue.com
. |
|
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
If you mean the whole paragraph being underlined, you'll have to use gray's solution, which I would avoid, personally - as your visitors will think it's a giant link (which, according to the HTML, it actually is - it just doesn't go anywhere). IE doesn't support the :hover pseudoclass on any element besides anchors, so you're out of luck going the simple route that you should be able to go: <p class="underlineme">blah</p> p.underlineme:hover { text-decoration: underline; } That would work in Firefox, Safari, Opera, etc - but not IE. Also something to consider - why would you want to make an entire paragraph underlined? That would make it much harder to read (not to mention confuse your readers like Brown suggests). |
|
|
|
#7 (permalink) |
|
Accurate
Join Date: Feb 2003
Location: UK
Posts: 1,311
|
Yes the texts are links... but I want the underline to appear when the mouse goes over. Thanks for the posts so far, will give it a try! decent web hosting - www.balue.com
. |
|
|
|
#8 (permalink) | |
|
Accurate
Join Date: Feb 2003
Location: UK
Posts: 1,311
|
Quote:
The paragraph is only about 9 words long...its more of a sentence. Its the clients request, it should look ok though. decent web hosting - www.balue.com
. |
|
|
|
|
#9 (permalink) | |
|
i still want paying
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,768
|
Quote:
i just presumed he already had them turned off earlier in the css |
|
|
|
|
#10 (permalink) |
|
Accurate
Join Date: Feb 2003
Location: UK
Posts: 1,311
|
I havn't applied any CSS yet to the page. This will be the next step...please don't remind me decent web hosting - www.balue.com
. |
|
![]() |