Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* the idea here is to create a link with an image AND some text,,,, but ONLY the text gets underlined*/
- /* with this setup and CSS it is not possible to take out the underline of the img element (since it is an in-line element)*/
- <a href=#><img src="path/to/file" /> some text</a>
- /* Because 'a' styling is supposed to have text-decoration:underline; and that affects the image too....
- even with:
- a img {text-decoration:none;}
- */
- so the hack comes here.... CSS this: .imagelink{text-decoration:none}
- and in HTML: <a href=# class="imagelink"><img src="path/to/file" /> <u>some text</u></a>
- where we can see how useful the <u> is....
Add Comment
Please, Sign In to add comment