-
basic CSS, align text to top of div
How do I make the first paragraph of text in a div start against the top edge?
thanks
Mark
-
Code:
DIV>p:first-child {margin-top: 0}
That won't work in Internet Explorer 6, if you need it to, you'll have to set up a class and apply the class to those paragraphs.
-
Thanks,
can I set that up in my CSS for the Div?
It does not seem to work there
But does in the paragraph without first child?
PHP Code:
#month1Dates, #month2Dates{ width: 271px; top: 0; float: left; border: 1px solid #CEB1E4; padding: 0 5px 0 5px; text-align:left; can I put it here? }
seems to work like this
#month2Dates p{ padding: 0 0 0 0; margin-top: 0; }
Last edited by mgason; 05-13-2010 at 03:51 PM.
Reason: extra info
-
No, you can't put it in #month1Dates or #month2Dates. You could do it as #month1Dates p, #month2Dates p, but that will apply to all paragraphs in that section, not just the first one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|