Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Need some quick help with html "td" Hurting my Brain.
Old 10-22-2010, 09:31 PM Need some quick help with html "td" Hurting my Brain.
Junior Talker

Posts: 2
Name: John Labroar
Trades: 0
Hello webmaster talk community
Well im coding a website and the content part of it is split into 3 TD columns all in the same row. I've added text to the first TD but when I add text to the second td it aligns it in the vertical middle of the td. My guess is because the second td has less text than the first td but how can I get around this?

Here is a image I made to better explain what I'm trying to solve:
Full size IMG: http://i55.tinypic.com/aaxabc.jpg


Here is my html/css code:
Code:
<table>
<tr>

<td id="LeftColumn" style="width: 200px; height: auto; ">My text is here</td>

  <td id="MiddleColumn" style="width: 200px; height: auto; ">My text is here</td>

  <td id="RightColumn" style="width: 200px; height: auto; ">My text is here</td>
  
</tr>
</table>
johnlabroar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-22-2010, 09:34 PM Re: Need some quick help with html "td" Hurting my Brain.
Crimson's Avatar
Skilled Talker

Posts: 56
Name: Connor
Location: United States
Trades: 0
The valign attribute is what you want. Add valign="top" to the <tr> tag, like this:

Code:
<table>
<tr valign="top">

<td id="LeftColumn" style="width: 200px; height: auto; ">My text is here</td>

  <td id="MiddleColumn" style="width: 200px; height: auto; ">My text is here</td>

  <td id="RightColumn" style="width: 200px; height: auto; ">My text is here</td>
  
</tr>
</table>
Hope that helps.
__________________

Please login or register to view this content. Registration is FREE

I solve code problems, browser compatibility (including IE 6), Wordpress trouble, the works.
Crimson is offline
Reply With Quote
View Public Profile Visit Crimson's homepage!
 
Old 10-22-2010, 09:37 PM Re: Need some quick help with html "td" Hurting my Brain.
Junior Talker

Posts: 2
Name: John Labroar
Trades: 0
Thank you!!!!!!!!!
johnlabroar is offline
Reply With Quote
View Public Profile
 
Old 10-23-2010, 03:39 PM Re: Need some quick help with html "td" Hurting my Brain.
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
WHY are you using tables at all? If it's for layout, you should not be using tables, you should be learning CSS. If it's for DATA ONLY, then that's what tables were meant for!
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-23-2010, 04:13 PM Re: Need some quick help with html "td" Hurting my Brain.
moatist's Avatar
Skilled Talker

Posts: 64
Trades: 0
Like LadynRed said, you can achieve the same result by using CSS. Here's one way.

Note: This is just off the top of my head, corrections are welcome.

CSS:
Code:
			
#wrapper {
  width: 630px;
  padding: 0;
}
			
.box {
  float: left;
  width: 200px;
  height: auto;
  background: #FAAA31;
  margin: 0 5px 0 5px;
  padding: 0;
}
HTML:
HTML Code:
<div id="wrapper">
   <div class="box">
   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas molestie    nisi at lacus aliquet et fermentum diam porta. Proin vestibulum pellentesque tortor ut interdum. Nunc placerat dapibus euismod. Phasellus vel dignissim nisi. Ut cursus augue at purus vestibulum ac consectetur velit tempor. In tempus tristique justo, quis laoreet nulla tristique vel.
   </div>
   <div class="box">
   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas molestie nisi at lacus aliquet et fermentum diam porta. Proin vestibulum pellentesque tortor ut interdum. Nunc placerat dapibus euismod. Phasellus vel dignissim nisi. Ut cursus augue at purus vestibulum ac consectetur velit tempor. In tempus tristique justo, quis laoreet nulla tristique vel.
   </div>
   <div class="box">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas molestie nisi at lacus aliquet et fermentum diam porta. Proin vestibulum pellentesque tortor ut interdum. Nunc placerat dapibus euismod. Phasellus vel dignissim nisi. Ut cursus augue at purus vestibulum ac consectetur velit tempor. In tempus tristique justo, quis laoreet nulla tristique vel.
   </div>
</div>
__________________
Think in code; Dream in digital.

<?php if($helpfull == true){ $talkupation++; } ?>
moatist is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need some quick help with html "td" Hurting my Brain.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.89816 seconds with 12 queries