View Full Version : <br /> a:after ?
rufus
01-12-2008, 11:28 PM
how can I add a <br /> after each link which are image containers ?
with
<a href="#"><img src="" alt="" /></a>
i want to get
<a href="#"><img src="" alt="" /><br /></a>
I have tried with :after but I cannot get it
thank you for helping
Medyman
01-13-2008, 03:56 PM
set the images to a class
replace
<a href="#"><img src="" alt="" /></a>
with
<a href="#"><img src="" alt="" class="img_link" /></a>
and add the following CSS code to your stylesheet (changing the margin height to your needs):
.img_link { margin-bottom:20px; }
You can't. :after is not supported by IE. You can do:
a img {
display: block;
}... but this will also "add a linebreak" before the image.
Beware those XHTML-like slashes: they probably don't mean what you think they mean. Read: http://www.webdevout.net/articles/beware-of-xhtml, http://www.hixie.ch/advocacy/xhtml.
rufus
01-13-2008, 04:53 PM
set the images to a class
replace
<a href="#"><img src="" alt="" /></a>
with
<a href="#"><img src="" alt="" class="img_link" /></a>
and add the following CSS code to your stylesheet (changing the margin height to your needs):
.img_link { margin-bottom:20px; }
thank you Medyman but that wasn't my question
rufus
01-13-2008, 04:54 PM
You can't. :after is not supported by IE. You can do:
a img {
display: block;
}... but this will also "add a linebreak" before the image.
Beware those XHTML-like slashes: they probably don't mean what you think they mean. Read: http://www.webdevout.net/articles/beware-of-xhtml, http://www.hixie.ch/advocacy/xhtml.
thanks but I am trying to add a br and no matter if IE cant understand it, it will in its 2008 version
tech_support
01-14-2008, 12:45 AM
Does that really matter? People will still be using IE7 and even IE6.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.