Login | Register | FAQ
Anonymous

No straight margin

+ Post a reply

2 posts Page 1 of 1


No straight margin

by Overgaard » Sun Mar 27, 2016 7:34 pm

Sorry - I am not sure im using the right words ..

I can´t make boxes made with CSS look the the same in both sides.
I have set right and left margin to 10% and the box size to 80%

Now I would asume that everything has the same size and everything is centered.
It is in the left side - but not the right side.

Look here for my test. As you can see .nav .sectionleft and .footer is not the same width.

Can anyone tell me what I do wrong?

My css looks like this:

Code: Select all
@charset "utf-8";
h1 {
   font-family: lobster;
   font-style: normal;
   font-weight: 400;
   font-size: 25pt;
   color: #032354;
}
body {
   font-family: source-sans-pro;
   font-style: normal;
   font-weight: 200;
   background-image: url(background.jpg);
   background-size: cover;
}
footer {
   background-color: #032354;
   color: #FFFFFF;
   font-weight: 600;
   font-size: x-small;
   text-align: center;
   margin-top: 10%;
   margin-right: 10%;
   margin-bottom: 10%;
   margin-left: 10%;
   padding-left: 10px;
   padding-top: 10px;
   padding-right: 10px;
   padding-bottom: 10px;
   clear: both;
   width: 80%;
}
nav {
   background-color: #032354;
   color: #FFFFFF;
   margin-left: 10%;
   margin-top: 3px;
   margin-bottom: 7px;
   text-align: center;
   width: 80%;
   margin-right: 10%;
   padding-top: 1px;
   padding-bottom: 1px;
}
.sectionleft {
   margin-left: 10%;
   margin-right: 10%;
   float: left;
   font-size: 1em;
   text-shadow: 3px 0px 1px #FFFFFF;
   padding-left: 5px;
   padding-right: 5px;
   text-align: center;
   background-color: #FFFFFF;
   border-top: 10px solid #032354;
   border-bottom: 10px solid #032354;
   height: auto;
   width: 80%;
   margin-bottom: 10px;
}
hgroup  {
   text-align: center;
}
a   {
   color: #FFFFFF;
   text-decoration: none;
}
.drivernav {
   margin-left: 10px;
   margin-right: 10px;
   padding-top: 0px;
   background-image: url(dartmenu1.jpg);
   background-size: contain;
   background-repeat: no-repeat;
   padding-left: 0px;
   background-color: #032354;
   background-position: 50% 55px;
   -webkit-transition: all .5s ease 0s;
   -o-transition: all .5s ease 0s;
   transition: all .5s ease 0s;
}
.carsnav {
   margin-left: 10px;
   margin-right: 10px;
   padding-top: 0px;
   background-image: url(dartmenu1.jpg);
   background-size: contain;
   background-repeat: no-repeat;
   padding-left: 0px;
   background-color: #032354;
   background-position: 50% 55px;
   -webkit-transition: all .5s ease 0s;
   -o-transition: all .5s ease 0s;
   transition: all .5s ease 0s;
}
.miscnav {
   margin-left: 10px;
   margin-right: 10px;
   background-image: url(dartmenu1.jpg);
   background-size: contain;
   background-repeat: no-repeat;
   background-color: #032354;
   background-position: 50% 55px;
   -webkit-transition: all .5s ease 0s;
   -o-transition: all .5s ease 0s;
   transition: all .5s ease 0s;
}
.homenav {
   margin-left: 10px;
   margin-right: 10px;
   padding-top: 0px;
   background-image: url(dartmenu1.jpg);
   background-size: contain;
   background-repeat: no-repeat;
   padding-left: 0px;
   background-color: #032354;
   background-position: 50% 55px;
   -webkit-transition: all .5s ease 0s;
   -o-transition: all .5s ease 0s;
   transition: all .5s ease 0s;
}
.homenav:hover {
   background-position: 0;
   color: #FF0000;
}
.drivernav:hover {
   background-position: 0;
   color: #FF0000;
   padding-top: 0px;
}
.carsnav:hover {
   background-position: 0;
   color: #FF0000;
}
.miscnav:hover {
   background-position: 0;
   color: #FF0004;
}
.Statstable {
   width: 60%;
   margin-left: 5%;
   text-align: left;
   background-color: #F0FF00;
   border-radius: 10px;
   border-spacing: 20px 0px;
   padding-top: 10px;
   padding-right: 10px;
   padding-bottom: 10px;
   padding-left: 10px;
   border: medium solid #090909;
   margin-top: 10px;
   margin-bottom: 10px;
}
User avatar

Overgaard

  • Posts: 2
  • Joined: Wed Mar 16, 2016 3:23 pm

Re: No straight margin

by nanoverso » Mon Mar 28, 2016 6:45 pm

Can you post the html for me to do some tests?
User avatar

nanoverso

  • Posts: 253
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil
--
Free VST Plugins Download.


+ Post a reply

Page 1 of 1