How to create a margin between two seperate divs?

Tags: html,css,html5,css3

Problem :

I have two divs at the moment containing different images and text. They use the same css style of .cheese_people I need to create a margin between the middle of the two boxes. How would I do this?

Also do I really need two divs to do this? The only reason I've done it like this is to get them on the same grid line.

            <div class=" grid 6 cheese_people">
        <img class="people_photo" src="img/cheese_expert.jpg">
        <h4>Chief Cheese Taster <br> Dave Le Conk</h4>
        <p class="chesse_people">I've always had a passion for cheese - Now I get to taste it everyday!</p>

    <div class=" grid 6 cheese_people">
        <img class="people_photo" src="img/cheese_owner.jpg">
        <h4>The Big Cheese Owner <br> Sally De Cheese</h4>
        <p class="chesse_people">I wanted to create an online store that I'd would trust</p>

        .cheese_people {
        font-family: sans-serif;
        background-color: #dec38c;
        border:solid 3px #6b5221;
       -moz-border-radius: 5px;
       -webkit-border-radius: 5px;
       border-radius: 5px;

Solution :

I'm not sure you want margin between both divs. You might want one sticked to the left, and the other sticked to the right (I say that because of the 45%). Then, use this :

.cheese_people:last-child {float: right}

    CSS Howto..

    How to fill 100% of an absolutely positioned div? (IE7+) [duplicate]

    How to get MathJax's HTML output just like

    CSS - How do you make text overflow out both ends of a div?

    how to make the title bar fixed

    how to make form input in middle

    How to add a css class into my function

    How to use div classes to get my blocks to line up?

    How to keep navigation tab remain unchanged

    How to make JS/Jquery Css and HTML popup

    How to Customise the angular material date-picker?

    How to manage multiple css files in rails 4?

    How to remove captcha image and it's textbox using css?

    How make input element take up available space next to a fixed width element?

    HTML CSS, how to create a Side bar or column

    How to repeat a CSS shape horizontally?

    How to create a header.php and footer.php with CSS files?

    how to position radio button outside of a block with css

    How to set css style to button?

    how to change collapse direction of a panel in bootstrap

    How do I correctly position elements and lay out a page?

    How to disable auto genrated css in media folder at runtime Magento?

    How to close this menu clicking outside?

    How to figure out if CSS transition is about to happen?

    Single page wordpress template. How to create new section in css

    How do I add keyboard bindings to carousel functionality? - jQuery

    WordPress admin stylesheet not showing images

    How to align image and text for my html/css

    How to call external CSS in presence of inline and internal?

    $(document).on(“click”… how to collapse a list when clicking anywhere else on the document

    ExtJS how to remove grid row underline when selected and over