Welcome to WebmasterWorld Guest from 54.167.155.147

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)



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

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

<table width="100%" align="center" cellpadding="6">
<tr>
<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>
</tr>
</table>
</div></td>
</tr>
</table>
<?php include_once "footer.php"; ?>
</body>
</html>
12:36 pm on Nov 29, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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)

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



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.