homepage Welcome to WebmasterWorld Guest from 107.22.141.14
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Paragraph displays on the right and not centered.
Scotty13




msg:4523550
 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>

 

londrum




msg:4523564
 12:36 pm on Nov 29, 2012 (gmt 0)

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

lucy24




msg:4523723
 9:33 pm on Nov 29, 2012 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved