Stephen Stephen - 4 years ago 93
HTML Question

Div padding not following html

So basically I'm trying to move an item in my Div 400px to the right. I've added "padding-left:400px" to the source html, but every time i run the code as you can see in the picture it is going back to 42px, when i change that number in inspect element to 400 then it looks normal, is there any reason its doing this?

Inspect

Here is my code snippet of the div:

<div class="content" style="border-bottom-width: 300px;margin-bottom: 0px;height: 430px !important;">
<div class="footer-grids" style="
width: 1500px;
padding-left: 400px;
margin-top: 100px;

Answer Source

There is no problem with your code , you have missing the closing div ,you need to check the div closing is right try with the below snippt , just inspect it

<div class="content" style="border-bottom-width: 300px;margin-bottom: 0px;height: 430px !important;">
	<div class="footer-grids" style="width: 1500px;padding-left: 400px;margin-top: 100px;"></div>
</div>

screenshot here

image here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download