Home › Forums › CSS › [Solved] getting padding-right for no reason? › Reply To: [Solved] getting padding-right for no reason?
December 28, 2014 at 1:48 pm
#191743
Participant
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="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
</head>
<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.