[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 832
  • Last Modified:

vertical centering a <p> tag in a div.. automatically

I have a fixed height div and I want to center a <p> tag that will vary in length, so it has to center vertical inside the div automatically.  I tried padding:0 auto 0 auto; and it didn't work.

How can this be done?   It's wordpress so I assume css 3 is available
0
tf2012
Asked:
tf2012
1 Solution
 
Jason C. LevineNo oneCommented:
Just FYI, WordPress has absolutely nothing to do with CSS 3.  CSS support is browser-based whereas WordPress just writes code you tell it to write.

When you say the p tag has to center vertically in a div, is it always the one p tag and div or is this something that would need to be applied multiple times in a given page/post?
0
 
tf2012Author Commented:
Thanks for replying, it seems to sit well without trying to force any centering on it so I'll close the question.  Re CSS3.... thanks.. I was automatically equating html5 & css 3 with word press but you are right.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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