Skip to content Skip to sidebar Skip to footer

How To Vertically And Horizontally Center A P Of Text In The Page

I want to create a page that justs has a paragraph of text centered in the page vertically and horizonally. Any ideas on how? Thanks

Solution 1:

Solution 2:

If you know the paragraph width/height, you may use CSS with this method. I can only think of tables for dynamic content, maybe the CSS experts will have better options.

Solution 3:

<tablestyle="width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;"><tr><td></td><td></td><td></td></tr><tr><tdstyle="width: 30%;"></td><td>Test</td><tdstyle="width: 30%;"></td></tr><tr><td></td><td></td><td></td></tr></table>

Ajust the widths to your suiting. This is short of using complicated JavaScript.

Post a Comment for "How To Vertically And Horizontally Center A P Of Text In The Page"