how to decrease space between headings?


Tags: html,css

Problem :

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;
}


Solution :

Like this

demo

css

h5{
    margin:0;
    padding:0;
}

    CSS Howto..

    How to create a pop up animation with a modal using css?

    How can I translate with webkit-transform enough so that

    CSS Sprites - How to leave Hover button in depressed state

    How to make a text or html tag look like a button

    Show/hide without using CSS

    How to fit a button to a hover box? And the button is not displaying properly?

    How do I align an item to the right inside a flex container?

    How to prevent mouseenter event action with jQuery

    Android stock browser: How to prevent double tap closing browser

    How to change CSS according time with JavaScript

    Images not showing up in IE 9

    How to denote common class names with slight numeral changes into one - CSS shorthand?

    How to create a web page with 4 rectangurlar splits?

    How do I reference host element in CSS of an Angular2 component?

    How to reverse a CSS animation on unchecked state?

    How to position my embedded flash file

    how to clear all css styles

    HTML/CSS: How can I float the 'a href' elements to the left without them leaving the div element that they are inside in?

    How to import a css file only for Firefox but not for other browsers?

    How to get table to overflow within a flex div?

    How can I apply a CSS class to an element with a given id, without modifying the element?

    How does floating and clearing on the same element work?

    How to disable JS function via CSS for certain page?

    How To Create A Responsive Horizontal Layout Using CSS?

    How to use Custom Fonts using CSS?

    HTML, CSS - I want to create a button “Preview” which will show user his input

    How do I keep a mouse cursor from changing to 'selected text' in JQuery?

    jQuery increase box to show overflow contents

    How do I get MS Outlook to accept the CSS style display:block?

    How to have logo go into / overlay black bar along the top of screen?