Simply give them margin: 0
, have a look: http://jsfiddle.net/BE4sy/2/
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;
}
Решение
Другие советы
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; }
Не связан с StackOverflow