Lunarpages Web Hosting Forum

Author Topic: How to get text to horizontally align  (Read 7014 times)

Offline Tsuchiyama

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • TS EXPORT
How to get text to horizontally align
« on: January 10, 2011, 01:29:23 AM »
Hi,

Just need a small tweak in the code to get the text to align on the home page of www.ts-export.com

Want the heading text of TS AUCTION SYSTEM
to horizontally align with the heading text YAHOO! JAPAN AUCTION

At the moment YAHOO! JAPAN AUCTION is displaying lower.  This is the current code:


<tr>
                    <td width="50%"><div align="left"><a href="http://www.ts-export.com/page.php?page=about_vehicles"><img src="http://www.ts-export.com/uploads/pages/2009_08_18_20_55_10_.jpg" alt="TS AUCTION SYSTEM" width="173" height="70" vspace="5" border="0" /></a></div></td>
                    <td width="50%"><div align="left"><a href="http://www.ts-export.com/page.php?page=about_vehicles" target="_blank"><img src="img/top/yahoo.gif" alt="Yahoo! Japan Auction" width="173" height="70" vspace="5" border="0" /></a></div></td>
                  </tr>
                  <tr>


                    <td><div align="left"><h2>TS AUCTION SYSTEM<SMALL><SUP>SM</SUP></SMALL></h2>
                  <p class="faq"><a href='http://www.ts-export.com/page.php?page=about_vehicles'>Covers 107 Japanese Auctions.<br /

>More than 80,000 vehicles daily.<br /><br /><b>FREE ACCESS NOW</b></a></div></td>

                    <td><div align="left"><h2>YAHOO! JAPAN AUCTION</h2>
<a href='http://www.ts-export.com/page.php?page=about_vehicles'>Usually with <b><i>over 1 million</i></b> automotive listings.<br /><br /><b>FREE ACCESS NOW</b></a></div></td>
                  </tr>
                </table></td>
                <td width="235" valign="top"><table width="235" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="21" background="img/top/comment_box_1.gif">&nbsp;</td>
                  </tr>
                  <tr>
                    <td background="img/top/comment_box2.gif" style="padding-left:8px;padding-right:5px"><?php echo $row_Auction['content']; ?></td>
                  </tr>
                  <tr>
                    <td height="13" background="img/top/comment_box_3.gif"></td>
                  </tr>
                </table></td>
                </tr>
             

Any suggestions?  Thanks.

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1557
    • http://www.notonebit.com
Re: How to get text to horizontally align
« Reply #1 on: January 10, 2011, 06:29:07 AM »
Since you used tables for your layout, add the CSS rule  vertical-align: top; to the YAHOO! JAPAN AUCTION table cell.
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline Tsuchiyama

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • TS EXPORT
Re: How to get text to horizontally align
« Reply #2 on: January 10, 2011, 07:27:22 AM »
Thanks Scanman,

Tried this:

  <td><div align="left"><vertical-align: top;><h2>TS AUCTION SYSTEM<SMALL><SUP>SM</SUP></SMALL></h2>

But it hasn't changed anything.  Sorry, I'm not good at this stuff.

Is there something else I should try?

Thanks again.

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1557
    • http://www.notonebit.com
Re: How to get text to horizontally align
« Reply #3 on: January 10, 2011, 11:27:39 AM »
<td style="vertical-align:top">
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline Tsuchiyama

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • TS EXPORT
Re: How to get text to horizontally align
« Reply #4 on: January 10, 2011, 02:48:56 PM »
Thanks Scanman,

Gave it a go but had to reverse the code out because it moved the "TS AUCTION SYSTEM" text into the YAHOO! JAPAN AUCTION text area and the YAHOO! JAPAN AUCTION text moved into an area to the right of where it was displaying.

Sorry I haven't been able to get it to work.

Thanks for your patience.

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1557
    • http://www.notonebit.com
Re: How to get text to horizontally align
« Reply #5 on: January 11, 2011, 06:17:27 AM »
Replace the table cell you have with this one:

Code: [Select]
<td style="vertical-align:top"><div align="left"><h2>YAHOO! JAPAN AUCTION</h2>
<a href="http://www.ts-export.com/page.php?page=about_vehicles">Usually with <b><i>over 1 million</i></b> automotive listings.<br><br><b>FREE ACCESS NOW</b></a></div></td>
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline Tsuchiyama

  • Intergalactic Cowboy
  • *****
  • Posts: 60
    • TS EXPORT
Re: How to get text to horizontally align
« Reply #6 on: March 10, 2011, 06:28:28 AM »
Thanks again Scanman.
Sorry, what  code should I reverse out before I substitute this code?

Offline rsweeting123

  • Space Explorer
  • ***
  • Posts: 9
    • canvas prints
Re: How to get text to horizontally align
« Reply #7 on: March 23, 2011, 09:04:15 AM »
If I was you I'd stop useing tables and learn how to use divs amd css :(

Offline Openxcell

  • Newbie
  • *
  • Posts: 1
    • Offshore Web and Mobile Application Development Company
Re: How to get text to horizontally align
« Reply #8 on: April 21, 2011, 03:28:06 AM »
I think you can try this. Keep alignment left and set the width for the same. Actually no property to display horizontal. Thanks.
« Last Edit: April 21, 2011, 08:23:41 PM by katrina1 »

Offline davidpo

  • Spacescooter Operator
  • *****
  • Posts: 44
  • Intellectsoft SEO Department.
    • Software development company.
Re: How to get text to horizontally align
« Reply #9 on: November 14, 2011, 06:32:26 AM »
I suggest you to rebuild you site from tabular layout to div.
Nowadays search engeenes likes <div> but not <td>.

Offline appdeveloper

  • www.trootech.com
  • Newbie
  • *
  • Posts: 2
Re: How to get text to horizontally align
« Reply #10 on: November 23, 2018, 10:37:16 PM »
Select the text that you want to align.
On the Home tab, in the Paragraph group, click Align Left or Align Right