• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

text in DIV with border on top, move text away from border downward

In attached code, the text is basically touching the top border of the DIV. I want to bump it down 4 pixels. Adding a margin-top moves the border and the text down. Adding a padding-top appears to do nothing. What is the correct way to do this? Thank you!
#exerciselist {margin: 0px 0px 9px 0px; padding 0px; width: 173px; border-top: 1px solid #c8cfd0;}

<div id="exerciselist">Exercise List</div>

Open in new window

2 Solutions
try this,

#exerciselist {margin: 0px 0px 0px 0px; padding-top: 15px; width: 173px; border-top: 1px solid #c8cfd0;}

Open in new window

bbdesignAuthor Commented:
Ah, darn it. So I was correct, padding-top is the right way to do it. I had a typo in my syntax:

padding 0px

Was missing the colon!

padding: 0px

Thanks anyway.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now