jeudi 9 février 2017

Issue where I can't float a DIV next to another DIV

Vote count: 0

I am struggling with getting a div to sit next to another div, but I can't seem to figure it out.

image of css issue where text does not float

I have a picture projectLarge, and a div sideLargePicArea, (which needs to sit next to the image) but everything I have tried has not worked. I thought display: inline; or float: left; would do the trick, also placing a float: left; on the projectLarge div, but no change.

HTML:

 <section class="projectLarge">
        <img src="/images/common/1.jpg" width="100%" height="100%" />
             <article class="sideLargePicArea">
                <span class="smaller noTop">SMALLER</span>
                "Et af de mest markante transformationsprojekter i Danmark i nyere tid".
                <span class="smaller">SMALLER</span>
                "Et af de mest markante transformationsprojekter i Danmark i nyere tid".
             </article> 
    </section>

CSS:

/* The page sits inside a #container div */

#container {
    display: block; 
    max-width: 1320px;
    padding-left: 3vw;
}

/* */

.projectLarge {
    max-width: 1035px;
    margin: 0 5% 5% -3vw;
    float: left;    
}

.sideLargePic {
    float: left;
}

.smaller {
    font-size: 13px;
    margin: 5% 0 2% 0;
}

asked 29 secs ago

Let's block ads! (Why?)



Issue where I can't float a DIV next to another DIV

Aucun commentaire:

Enregistrer un commentaire