Grow your CSS skills. Land your dream job.

Text Padding does not seem to work

  • # June 16, 2010 at 3:22 pm

    Hello,

    I have a problem with a file.
    here is a video link to explain it:
    http://www.designshoptoronto.com/Diddley/CSS.mov

    and some links to the css:
    http://www.designshoptoronto.com/Diddley/style.css

    and html files:
    http://www.designshoptoronto.com/Diddley/test2.html

    Does any body know what I am doing wrong?
    Please help when you get a chance.

    Thanks,
    Tracey

    # June 16, 2010 at 4:04 pm

    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.

    -T

    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".