The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] getting padding-right for no reason? Reply To: [Solved] getting padding-right for no reason?


actually I have all the head tags inside the head but it shows it inside the body for no reason :/

Again, “no reason“? No, there is a reason, and that’s because you placed HTML code between the HEAD and BODY tag:

<script src="//"></script>
<header class='nav'><a href='/answers' style='text-decoration: none;color:white;padding-left: 15px;
font-size: 20;'>BlodExchange</a></header>

<body style="background-color:#EEEEEE;">

I dont think so, left:40% of the body which mean it should not create any extra padding out of the body

No, it means that your block will be repositioned and placed 40% left of the body, while keeping the same 100% width, hence taking up space outside of the body on the right.

Also, I second @Paulie_D’s advice above.