Jump to content

HTML margins


Krissu3212

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 comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...