Jump to content

Can't Add Padding To A Block Element

Recommended Posts

My page is here: http://fliers.greenbranders.com/images/matt/In the header, I want "Mike Smith Homepage" to have like 20 pixels of top padding and 300 pixels of left padding. In my CSS, when I add padding-top:20px and padding-left:300px to my "header" class, the blue box extends 20px on the top and 300px to the right. I just want to position the text inside. Can someone please help me out?

Link to post
Share on other sites

Padding adds to the full width of a block. If you want to add padding, you'll have to subtract the same amount from the width and height of the box.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...