Removing image boder-bottom link (while retaining border bottom for text links)
-
Woah, long title, sorry! But is there a way to remove the the border bottom on an image that is linked? See first post here: http://hypun.wordpress.com/
At the same time though, I still like my text links to have the border bottom (that’s what I did with CSS). I wonder if I can isolate the image link problem and still keep the text links properties as is. Thanks
-
you need to use (I think) the tag
a imgand set “text-decoration: none”
I’m sure that root or devblog or SBK will be along in a minute to tell you the right way, but I think this is right!
Collin
-
Oh I should’ve said what I tried.. and the “text-decoration:none;” was one of them — didn’t work though.
Cool, I’ll wait a bit for the others replies then. Thanks
-
you tried it on the a img tag in the CSS? Hmm that’s bloody weird, it works for me when I use it! Ho hum!
-
a img{}Won’t work because you’re applying the rule to the img element, not the a tag. The a tag is what has the border defined in its selector.
What I’d suggest you to do is to create a class selector where you specify that the link you’re gonna use is an image for which you don’t want a dotted bottom-border.
So, create the new class selector and define it like this:
a.imglnk{ border: none; }And your HTML should look something like this:
<a href="#" class="imglnk"><img src="your image" ... /></a>HTH
-
-
-
-
- The topic ‘Removing image boder-bottom link (while retaining border bottom for text links)’ is closed to new replies.