Results 1 to 4 of 4

Thread: Table alignment versus Text alignment...

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Question Table alignment versus Text alignment...

    Ok, I'm obviously havin a major brain fart today... I am having problems getting my text to "align" to the left, but be offset to the right a bit without having to use "&nbsp;" over and over and over and over.... I've tried <div> and <span> but they don't work like what I'm wanting.... I thought I almost had it down when I started putting table after table inside of the main table... and just aligning them differently... but now i've got text that overlaps, aligns all funky, and just won't do what i want! Anyway, here is a sample of what I'm talking about...

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>February Events</title>
    </head>
    <body background="back.gif" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
    </br>
    </br>
    <table border=2px align="center" bordercolorlight="#FF4400" bordercolordark="#aa4400" cellspacing=0 cellpadding=0 width="500px">
    <tr>
    <td background="bg.png" align="center" border="2px" bordercolorlight="#FF4400" bordercolordark="#aa4400"><font color="black" size="4"><b>February Calendar of Events</b></font>
    </td>
    </tr>
    <table border=2px bordercolorlight="#FF4400" bordercolordark="#aa4400" align="center" cellspacing=0 cellpadding=0 class="text-primary" width="500px">
    <tr>
    <td border=2px bordercolorlight="#FF4400" bordercolordark="#aa4400" background="back.gif" align="left">
    <font color="#FF6600" size="4px">
    <center>
    </br>
    <b><u>Coming Events</u></b>
    </center>
    </font>
    </br>
    </br>
    <table border="0" cellspacing="0" cellpadding="0" align="left">
    <tr>
    <td>
    <font color="#FF6600" size="3"> <u>February 7th:</u>&nbsp;
    &nbsp; Chamber Board Meeting </br> </br> <u>February 9th:</u>&nbsp; &nbsp;
    Starting A Business In Arkansas </br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thursday, February 09,
    2006 </br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; 6:00 p.m. - 9:00 p.m. </br> &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Waldron
    Police Department </br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Waldron </br> &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cost: $25&nbsp;
    &nbsp; &nbsp;
    </tr>
    </td>
    </table>
    </br>
    </br>
    <table border="0" cellspacing="0" cellpadding="0" align="left" >
    <tr>
    <td align="left" border="0px" width="400px">
    <font color="#FF6600" size="2px" face="verdana">
    <b>Seminar Highlights:</b>
    </tr>
    </td>
    </table>
    </br>
    <table align="left">
    <tr>
    <td align="left">
    <font color="#FF6600" size="2px" face="verdana">
    Many of the questions entrepreneurs have about starting a business in Arkansas are answered in this three-hour workshop. "Starting a Business in Arkansas" prepares participants for the intensive business planning process. Find out the major steps crucial to starting a business; identify key issues that affect your business success and discuss start-up requirements, as well as common pitfalls you will face as an entrepreneur. Includes a 50-page feasibility workbook and a New Venture Guide.
    </font>
    </td>
    </tr>
    </td>
    </tr>
    </table>

    <tr>
    <td>
    </br>
    <font color="#FF6600" face="verdana" size="2px">
    <u>February 14th:</u> &nbsp;Valentine's Day
    </font>

    </td>
    </tr>
    </table>
    </table>
    </body>
    </html>


    Now HERE is what i'm trying to achieve minus the pretty table borders and stuff...



    Coming Events

    February 7th: Chamber Board Meeting

    February 9th: Starting a business in Arkansas
    Thursday February 09, 2006
    6:00pm - 9:00pm
    Waldron Police Department
    Waldron, Arkansas
    Cost: $25

    Seminar Highlights:
    Many of the questions entrepreneurs have about starting a business in Arkansas are answered in this three-hour workshop. "Starting a Business in Arkansas" prepares participants for the intensive business planning process. Find out the major steps crucial to starting a business; identify key issues that affect your business success and discuss start-up requirements, as well as common pitfalls you will face as an entrepreneur. Includes a 50-page feasibility workbook and a New Venture Guide.

    Well, you get the general Idea... I don't know what on earth i'm doin wrong... but i've beat my head against the wall for a while now trying to figure this one out... I guess I'm just not that good with HTML, I don't know all the features I suppose. I know it's possible because I've seen it on thousands of other sites... but they usually have it set up through css somehow and I can't access the style sheets... Anyway, if anyone could help I would be more than grateful. Thank you.

  2. #2
    Join Date
    May 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If all you trying to accomplish is an indent just add padding to the cells you need to indent.

    It would look something like this: <td style="padding-left: 100px;">your indented text here</td>

    You don't need to add "align-left" all the time - left alignment is default.

    Right now you have way too many unnecessary tables

  3. #3
    Join Date
    May 2005
    Location
    newcastle, australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here's probably the most simple code i could manage in 2 minutes. it works exactly as you want it to, just going on the example you gave above of what you wanted the layout to look like. i've left the borders in to show you what's going on. when you use the code, to remove the borders, simply change the "1" to a "0" in the border attribute in the table element. use this code to work yourself up to adding the other bits of info you have on your page.

    cheers.

    Code:
    <html>
    <head>
    
    <body>
    
    <table width="100%" border="1">
    <thead>
    <colgroup>
    	<col width="100">
    	<col width="*">
    </colgroup>
    </thead>
    <tbody valign="top">
    	<tr>
    		<th colspan="2">Coming Events</th>
    	</tr>
    	<tr>
    		<td>February 7th:</td>
    		<td>Chamber Board Meeting</td>
    	</tr>
    	<tr>
    		<td>February 9th:</td>
    		<td>Starting a business in Arkansas
    		<br>Thursday February 09, 2006
    		<br>6:00pm - 9:00pm
    		<br>Waldron Police Department
    		<br>Waldron, Arkansas
    		<br>Cost: $25
    		</td>
    	</tr>
    	<tr>
    		<td colspan="2"><strong>Seminar Highlights:</td>
    	</tr>
    	<tr><td colspan="2">Many of the questions entrepreneurs have about starting a business in 
    
    Arkansas are answered in this three-hour workshop. "Starting a Business in Arkansas" prepares 
    
    participants for the intensive business planning process. Find out the major steps crucial to 
    
    starting a business; identify key issues that affect your business success and discuss start-up 
    
    requirements, as well as common pitfalls you will face as an entrepreneur. Includes a 50-page 
    
    feasibility workbook and a New Venture Guide.</td>
    	</tr>
    </tbody>
    </table>
    
    </body>
    </html>

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Talking Forgot I even posted that!!!

    Wow, sorry guys... I totally forgot I even made this post! I already got it figured out... but may go back and insert your code as mine was much bulkier. *Sighs* Anyway, thanks for the help anyway though! LOL

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •