Jump to content

Recommended Posts

Hi, why does these div tags stretch their margins across the whole "main" div. The "main" div is inside "maincontainer" div that covers the whole page basically and the "main" div is 90% of it.

I don't want these margins because i want the pictures to be next to each other.

Here's also the CSS of those divs: (I'm sure there's a way to not repeat all this code but I needed to have them in different divs to position them differently on the website, which i haven't done yet)

#main {
    height100%;
    width90%;
    margin-left91px;
    
}
/* Main div is inside it */
#maincontainer {   
    /* Sets two background images */
    width100%;
    height2415px;
    background-imageurl("images/city.jpg"), url("images/nature.jpg");
    background-positiontopbottom;
    background-size100% 50%;
    background-repeatno-repeatno-repeat;
}
 
 
.button_container1 {
    height180px;
    width200px;
    margin-top20px;
    border2px solid black;
    background-colorwhite;
    border-radius6px;
    /* margin-left: 972px; */
    
}
.button_container2 {
    height180px;
    width200px;
    margin-top20px;
    border2px solid black;
    background-colorwhite;
    border-radius6px;
    margin0;
}
.button_container3 {
    height180px;
    width200px;
    margin-top20px;
    border2px solid black;
    background-colorwhite;
    border-radius6px;
    margin0;
}

 

 

Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...