i make a div and inside i make headings but when i show then headings are outside div how to decrease heading margins? here is my code:
<div id="left" style="width:300px; height:100px; float:left; margin:5px 40px 0;">
<h5 id="companyname">{{companyname}}</h5>
<h5 id="companyaddress">{{companyaddress}},{{companycity}},</h5>
<h5 id="companycountry">{{companycountry}}</h5>
</div>
and here is css:
#companyname{
text-align:left;
font-size:13px;
}
#companyaddress{
text-align:left;
width:68%;
font-size:13px;
}
#companycountry{
text-align:left;
font-size:13px;
}
Like this
demo
css
h5{
margin:0;
padding:0;
}
try adding
h5
{
line-height:10px;
}
i have used 10px you can use values accordingly to your need
Fiddle Demo
Setting up the margins and padding accordingly is also a good option
h5 {
margin:0px;
padding:0px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With