Raslav M
Raslav M

Reputation: 133

Css: Mysterious margin

Does anyone know why this mysterious margin is? This is the link to my site

I have tried everything! Turning all the margins off and on and playing with padding but i just cant find the problem why does horizontal slider bar appear?

Thanks for all help!

Upvotes: 2

Views: 967

Answers (6)

H.Tangare
H.Tangare

Reputation: 1

Fix the "body {marign...}" typo as jdero said and your horizontal bar will be gone. You don't need to set all the margin-top, bottom etc to 0 though. Once you fix the typo you will have body {margin : 0px}. This is all you need to set them all to 0.

Upvotes: 0

Johan
Johan

Reputation: 361

What I always do to prevent this kind of margin/padding:

* {
padding:0;
margin:0 auto;
}

It just gives every element standard 0 margin and padding, unless you change it per element of course.

Upvotes: 0

Mohammad Masoudian
Mohammad Masoudian

Reputation: 3491

it's on fg_membersite.css line 5 :

body {
    background-color: rgb(230, 230, 230);
    width: 100%;
    height: 100%;
}

change to this :

body {
    background-color: rgb(230, 230, 230);
}

Upvotes: 1

user2188149
user2188149

Reputation:

.ads {
width: 160px;
height: 600px;
background-color: orange;
float: right;
}
.content {
margin-top: 50px;
width: 100%;
height: 100%;
}

Upvotes: 0

Rohitashv Singhal
Rohitashv Singhal

Reputation: 4557

use this code :

body {
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
   margin-left: 0px;
}

probably may help you

Upvotes: 1

jdero
jdero

Reputation: 1817

You have a pretty significant typo in your css:

body{
    marign: 0px;
    background-color: #e6e6e6;
    width: 100%;
    height: 100%;
}

margin is spelled incorrectly.

To eliminate some odd margins that arise, I would suggest adding this to your code:

body {
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
   margin-left: 0px;
}

Usually a pretty safe bet that eliminates some unnecessary margins, and fixes your problem. I get that you have some margins all over the place, but from your post it's hard for us to understand which margins you are trying to eliminate.

Upvotes: 2

Related Questions