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

Home Forums CSS Text Padding does not seem to work Re: Text Padding does not seem to work

Capt Otis

A quick fix for me would be to place another div inside your box. Your outside box (the one currently there) would hold your background picture, relative placement… ect. Give the newly created box a small width and align the text how you want it. But again, that is only a quick work around. I am going to look at this a little further and see if I can find your problem.


EDIT: Left Padding!!!

Your body sets the text to left align. You then set your box padding to 10px 30px 10px 40px. The browser cannot give you your 30px right padding because the text is left aligned and you are also telling it to have 40px left padding. The box isn’t big enough for that. Decrease your left padding, or set the boxes to be right aligned. :D