control the space of a <br> tag

Hi, the space between blocks of text is separated with a break tag. But sometimes this space can be too big (I don't use p tags) Is there a way to control the space?

Thanks

lister

Redferret, 5 years ago

you could use a span with font-size to change the size of the br, like this...

some text
<br />
<span style="font-size:20px">
<br />
</span>
more text.

You could also use a block element like a small table but you'll still need to use font-size and/or line-height.

In this situation P tags are the most efficient, and provided you set margins to 0 and use only the bottom margin for spacing you should be okay across the board.


Gmail app apologist
lister, 5 years ago

Thanks,

the only this is the block of text and space is determined my the client (They will be adding the content themselves in a template). As for p tags, how reliable are they across email applications. I often use content in a DIV and style that.

Thanks for the reply.

Wayne B Wayne B, 5 years ago

Specify a DIV line-height style to control spacing between lines when you use BR. For instance, here's what it looks like with an inline style:

<div style="line-height:12px;"><multiline>blah blah<br>
blah blah<br>
blah blah</multiline></div>

roshodgekiss roshodgekiss, 5 years ago

Hey guys, just to extend what Wayne said above, you could always skip the div and add the following to your CSS code:

p { line-height:12px; }

Keep in mind that the <multiline> tag adds <p> tags to the content therein, which could be what is causing these spacing issues. To be certain, you can always try the following:

p { margin: 0; padding: 0; }

Let us know if you have any questions about this :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free