View Full Version : can i style br?

10-29-2007, 10:17 AM

can i style br? it being a selfcontained selector?

it isnt included in http://www.w3.org/TR/2007/CR-CSS21-20070719/propidx.html

i was thinking

br {
margin-bottom: 15px;

instead of doing double brs inside ps

any problems?


10-29-2007, 11:16 AM
Why don't you just try it and see?

From my experimentation, the answer is no. You cannot style the <br /> either by styling the tag or setting a class.

This is true for FF2 and IE7.

John Rostron

10-29-2007, 11:16 AM
Why donít you just try it if you already know what you want?
Line breaks can be styled, although possibilities are limited. Best would be to try it, then you see whatís possible in which browser.

10-29-2007, 11:19 AM
Doesn't work x-browser.
The present trend is not/never to use <br>, but apply a margin to another element.

10-29-2007, 09:23 PM
The best way to style a <br> is to apply a line-height to the element it is contained within.

10-30-2007, 02:05 PM
why are you styling a <br> in the first place? Why dont u just add the margin to wtv u need the space under?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum