Fin Moorhouse
Fin Moorhouse

Reputation: 335

Gap between difference in paragraph size

Here's the fiddle: http://jsfiddle.net/BE4sy/

Essentially, I would like to eliminate the gap between these two paragraphs. I realise this is a very inexperienced question, but I can't figure out how.

Here's the code:

html:

<p id='big'>
Big Text
</p>
<p id='small'>
Small Text
</p>`

css:

#big
{
font-size:100px;
}
#small
{
font-size:20px;
}

Upvotes: 4

Views: 93

Answers (4)

zzlalani
zzlalani

Reputation: 24364

Change your css with this code

#big
{
   font-size:100px;
   padding:0;
   margin:0;
}
#small
{
   font-size:20px;
}

Upvotes: 1

Dr Rob Lang
Dr Rob Lang

Reputation: 6883

Setting the margin changes the gaps:

p { margin:0; }

Upvotes: 1

Ivan Chernykh
Ivan Chernykh

Reputation: 42166

Simply give them margin: 0 , have a look: http://jsfiddle.net/BE4sy/2/

Upvotes: 1

Arun Bertil
Arun Bertil

Reputation: 4638

Try setting

#big
{
    font-size:100px;
    line-height:0px;
}
#small
{
    font-size:20px;
    line-height:0px;
}
p { margin:0; }

Upvotes: 0

Related Questions