Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Paragraph displays on the right and not centered.

11:56 am on Nov 29, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:Feb 23, 2012
posts: 91
votes: 0

On my about.php page... my paragraph displays on the right hand side and not centered. Here is my script, minus the paragraph.

<table class="mainBodyTable" border="0" align="center" cellpadding="0" cellspacing="0">
<td width="700" valign="top">
<div align="center">
<table width="100%" align="center" cellpadding="5">

<table width="100%" align="center" cellpadding="6">
<td width="100%"><p align="left">Welcome

<p align="left">

<p align="left">

<p align="left">

<p align="left">&nbsp;</p>
<p align="left">See you soon.</p>
<p align="left">Thank you,</p></td>
<?php include_once "footer.php"; ?>
12:36 pm on Nov 29, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2006
votes: 67

its probably because it's in a <td> cell. try putting text-align:left on the td cells

you really need to get rid of all the tables though. if all you've got is a few <p>s in them, then there's no need for 3 nested tables and a <div>. it looks like you are using empty <p>s for line-breaks too. you should try switching to <br> instead

i would scrap the whole lot and just use <p>s. it will cut your code down and be a lot easier to style
9:33 pm on Nov 29, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
votes: 420

The very first thing in your HTML is <table class = "blahblah"> implying that you've got a stylesheet somewhere. But then it seems to evaporate and it's all "align=" from there on.

On some browsers
<div align="center">
will override default settings for everything inside the div. Don't use it. In fact, scrap the div.

you should try switching to <br> instead

Or define a paragraph class with a bigger top margin. Or spacing between adjacent paragraphs, like
td p + p {margin-top: something-bigger-here;}
if you don't want the first paragraph to have extra room at the top.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members