468,514 Members | 1,669 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

Unable to align text

4
Hi All
This may seem like a stupid question but I can't get my text to left align. It used to but it's now decided to centre and I can't see why.

I have include the css and the relevant table code. If one of you can spot the problem I would appreciate it.

The table "top info box" is within the table "main".

The page can be seen at it's temporary home here. http://mariehines.co.uk/NEW/home.php

Regards
Ray

CSS
body {
background: #FFFFFF ;
/*: url(bg.jpg) fixed; */
text-align: left;
color: #000000;
font: 11px verdana, sans-serif;
margin: 0px;
padding: 0px 0px 0px 0px;
}
.header {
width: 1200px;
height: 235px;
margin-left:auto; margin-right:auto;
background: url(images/header.jpg) no-repeat;
font: 9px verdana, sans-serif;
text-align: right;
color: #000000;
}
.main {
width: 1200px;
height: 1200px;
margin-left:auto;
margin-right:auto;
background: url(images/bg1200x1200_R.jpg) no-repeat;
font: 10px verdana, sans-serif;
text-align: left;
color: #000000;
}

.topinfobox {
width: 100%;
margin-left:auto; margin-right:auto;
font: 10px Verdana, Arial, Helvetica, sans-serif;
text-align: left;
color: #000000;

}

.sideinfobox {
width: 490px;
font: 10px "Verdana", Arial, Helvetica, sans-serif;
text-align: left;
color: #000000;
}
.liveinfobox {
width: 600px;
font: 10px "Verdana", Arial, Helvetica, sans-serif;
text-align: left;
color: #000000;
}

.bold {
font-weight: bold;
}
.eandrinfobox {
width: 99%;
font: 10px "Verdana", Arial, Helvetica, sans-serif;
text-align: left;
color: #000000;
}
.H1{
font: 200% "Verdana", Arial, Helvetica, sans-serif;
text-align: left;
/* color: #f97373 */
}
.blank {
width: 1200px;
height: 1200px;
margin-left:auto;
margin-right:auto;
/* background: url(bg1200x1200_R.jpg) no-repeat; */
/* border-left: solid 2px #000000; */
font: 10px verdana, sans-serif;
text-align: right;
color: #000000;
}
.rockschool {
width: 1200px;
height: 1200px;
margin-left:auto;
margin-right:auto;
background: url(images/bg1.jpg) no-repeat; */
/* border-left: solid 2px #000000; */
font: 10px verdana, sans-serif;
text-align: right;
color: #000000;
}
.media {
width: 1200px;
height: 1200px;
margin-left:auto;
margin-right:auto;
background: url(images/bg2.jpg) no-repeat; */
/* border-left: solid 2px #000000; */
font: 10px verdana, sans-serif;
text-align: right;
color: #000000;
}
.radiolisting {
width: 100%;
font: 10px verdana, sans-serif;
text-align: left;
color: #000000;
}
A.link {
font-family: tahoma;
font-weight: normal;
font-size: 10px;
text-decoration: none;
color: #D1CE89;
}
A.visited {
font-family: tahoma;
font-weight: normal;
font-size: 10px;
text-decoration: none;
color: #d1a78f;
}
A.menu2:hover {
font-family: tahoma;
font-weight: normal;
font-size: 10px;
color: #D9D49A;
font-style: normal;
text-decoration: none;
}

.main tr td .sideinfobox tr td p {
text-align: left;
}
TABLE CODE
Expand|Select|Wrap|Line Numbers
  1. <table class="main">
  2.   <tr>
  3.     <td height="214" colspan="2" valign="top"><table class="topinfobox">
  4.       <tr>
  5.         <td width="168" height="189" align="left">&nbsp;</td>
  6.         <td width="218" align="left" valign="top"><p><strong>Do you want to..</strong></p>
  7.           <p align="left">Learn to play an instrument?<br />
  8.               Form a Rock Band?<br />
  9.               Form a Pop Group?<br />
  10.               Be an MC/DJ?<br />
  11.               Record your own music?<br />
  12.               Be a Radio DJ or Producer?<br />
  13.               Set up a Record Label?<br />
  14.               Play live in your own venue?<br />
  15.               Be a music reporter or critic? </p>
  16.           <p><strong>Just  have FUN with music?</strong></p></td>
  17.         <td width="298" align="left" valign="top"><p><strong>We can..</strong></p>
  18.           <p>Teach you to play or sing.<br />
  19.               Provide mentors to help you.<br />
  20.               Provide our own Internet Radio Station.<br />
  21.               Provide our own recording studio.<br />
  22.               Provide our own live venue.<br />
  23.               Provide our own educational programmes.<br />
  24.               Provide what you need. <br />
  25.               If we don't have it we'll try and get it.<br />
  26.               <br />
  27.             </p>
  28.           <p><strong> Let you have FUN with music.</strong></p></td>
  29.         <td width="298" align="left" valign="top"><p><strong>Don't want to sing or play?</strong></p>
  30.           <p>How about becoming a volunteer?<br />
  31.               Can you mentor?<br />
  32.               Can you Fundraise?<br />
  33.               Can you talk companies into giving us stuff for FREE?<br />
  34.               Can <strong>YOU</strong> give us stuff for FREE? </p>
  35.           <p>If so contact us, or come down to The Lighthouse and talk to us. We need your help.</p></td>
  36.       </tr>
  37.     </table>
Feb 5 '10 #1
6 2221
drhowarddrfine
7,435 Expert 4TB
In one of your stylesheets you have 'body p {text-align:center}'
Feb 5 '10 #2
acorna
4
Thank you for your reply.

However, I cannot find this code. Could you be more specific.

Regards
Ray
Feb 5 '10 #3
drhowarddrfine
7,435 Expert 4TB
It's not in what you posted, it's in your link in the HTML.
Feb 5 '10 #4
acorna
4
Wow! great spot. That was in the footer.

How did that have an effect on the main code?

Ray
Feb 5 '10 #5
drhowarddrfine
7,435 Expert 4TB
'body p' means all p that's a descendant of body. That's the "cascading" part of CSS. It doesn't matter where you declare it but <style> belongs in the <head>.
Feb 6 '10 #6
acorna
4
Thanks again dr. The css in the footer is only temporary until the contents have been decided. All css will eventually be in one file.

Thanks for the explanation, it's appreciated.

Ray
Feb 6 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Arun Nair | last post: by
reply views Thread by deepaks85 | last post: by
7 posts views Thread by Dave Hardenbrook | last post: by
2 posts views Thread by yangtono | last post: by
2 posts views Thread by Kevin | last post: by
8 posts views Thread by harryjohal | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.