0

I have -

<p>some text as 'intro'</p>
<h1>Big Text</h1>
<p>some text as 'outro'</p>

I have this set out on a background image, I have styled margins and fitted the text inside properly, but I want to bunch up ALL text so there is little gap - line-height would ruin it and I have tried seperate div tags but no luck - what is the best chosen css method for this?

Thanks!

Douglas B. Staple
  • 10,510
  • 8
  • 31
  • 58
  • Could you please clarify what you mean with 1. I have styled margins and fitted the text inside properly, 2. I want to bunch up ALL text so there is little gap, 3. line-height would ruin it? – Mauritz Hansen Mar 08 '13 at 11:07
  • 1, used CSS to ensure text layout is within background image, 2, text vertically 'tight' together (on top of each other) 3, akin to line-height but is there a better way? ie, you cannot bunch the

    and together as they are separate html

    –  Mar 08 '13 at 14:01

1 Answers1

0

If you require the use of those elements you could use negative margins:

<p>some text as 'intro'</p>
<h1 style="margin: -15px 0 -15px">Big Text</h1>
<p>some text as 'outro'</p>

A better way is probably to separate the different lines by line breaks and to style the 'header' line, like so:

<p>some text as 'intro'<br />
<span style="font-size: 200%; font-weight: bold;">Big Text</span><br />
some text as 'outro'</p>
Mauritz Hansen
  • 4,674
  • 3
  • 29
  • 34