Вопрос

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;
}
Это было полезно?

Решение

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

Другие советы

Setting the margin changes the gaps:

p { margin:0; }

Change your css with this code

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

Try setting

#big
{
    font-size:100px;
    line-height:0px;
}
#small
{
    font-size:20px;
    line-height:0px;
}
p { margin:0; }
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top