Forum Moderators: not2easy

Message Too Old, No Replies

br tags - no padding or margin?

assigning padding or margin to br tags internet explorer

         

EliZaW

3:08 pm on Jan 24, 2006 (gmt 0)

10+ Year Member



Hi,

I need to assign some padding or margin to <br> tags, which of course works fine in FF, but not IE (6). Is there a nifty way around this? Please note that unfortunately, I do need to keep the br tags in the code, so can't just replace them with something else - is there some other way around this?

Thank you!

/EliZaW

Span

3:13 pm on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



br {
line-height:100px;
}

or:

br {
font-size:100px;
}

EliZaW

3:25 pm on Jan 24, 2006 (gmt 0)

10+ Year Member



That was quick - thanks.

Unfortunately that trick doesn't work though - neither in FF nor IE.

Span

3:54 pm on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using a larger font-size to make a bit more vertical space is one of the oldest tricks on the web. Seven years ago I used <font size="+4"><br></font> or something like that.

Setting a line-height or font-size for a break works in every browser on my Mac (have to say though, looking at it right now, not in Mac/IE..), but I'm surprised you're not even seeing something happening in FF. Weird.

And welcome to the forums, EliZaW

D_Blackwell

3:57 pm on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know that you can do that. Typically, I'll just use two <br /> if need be. If need more than that, then I go another route anyway.

Here's an old reference from CSS Discuss: Eirc Meyer - Incutio [archivist.incutio.com]

EliZaW

4:06 pm on Jan 24, 2006 (gmt 0)

10+ Year Member



Thanks a lot both of you! The Eric Meyer reference was useful - it kind of proves my suspicsion that there isn't much to do about it.

Of course I could get rid of the brs, but I was trying to find an easy way out and just edit the style sheet rather than messing with a bunch of cms-files that govern the content.

SuzyUK

4:11 pm on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



EliZaW

>>removing them
without physically removing them could you set their display property to none, and then work with the other styles as if they weren't there e.g. pad/margin the paragraphs or divs or whatever is left?

Suzy