Solved

html table

Posted on 2013-06-25
12
357 Views
Last Modified: 2013-06-26
so i'm a novice at html and need to create a table that has 3 columns and 1 row (in order to display information on a webpage that has different information sitting next to each other, from left to right).

the CMS site i'm using to create the webpage is www.portfoliobox.net so i have to use a table to accomplish this (no fancy CSS, etc). code that i need help with and how it's appearing is attached. that's not how i want it to look.

what i am trying to achieve is this: all the CONTENTS of the table needs to be aligned top left. but at the moment, the text and images are all aligning all over the place (center, etc).

i've searched on the net on how to use valign tags, etc and it's confusing and nothing is working.

please help!
Screen-Shot-2013-06-26-at-10.30..png
Screen-Shot-2013-06-26-at-10.30..png
0
Comment
Question by:ss80ss
12 Comments
 

Author Comment

by:ss80ss
ID: 39276680
TRIED THIS AND DIDN'T WORK:

<table border="1" cellpadding="1" cellspacing="1" style="width: 900px; text-align:left; vertical-align:top">
      <tbody>
            <tr>
                  <td>
0
 
LVL 12

Expert Comment

by:duttcom
ID: 39276685
Valign is used in the <td> tag like so - <td valign="top">

You should not need to specify left alignment as that is the default.

You can use CSS (in a non-fancy way) in your table by specifying it in the HTML tags like so - <td style="vertical-align:top;">
0
 
LVL 12

Expert Comment

by:duttcom
ID: 39276697
I am guessing your column widths are not what you are expecting because you have only specified the width of the whole table; You would think that the text would cause the image column to to shrink to fit the width of the image, but html tables don't render that way.

You can still specify the width of the table, but to control the width of the columns, you can do so by adding to the <td> tag -

Column 1 <td> might be <td width="150px">
Column 2 <td> might be <td width="200px">
Column 3 <td> SHOULD BE <td width="*"> so that the third colum is whatever width is required to make the table the required 900px wide.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:ScorchD
ID: 39276701
Can you post a link to the page, there is probably CSS being applied to the contents that we cannot see from the screenshot.
0
 

Author Comment

by:ss80ss
ID: 39276705
here is a link to the page:

http://sumi.portfoliobox.me/about
0
 

Author Comment

by:ss80ss
ID: 39276710
i added the following and it's still not working:

<td align="LEFT" valign="TOP">
Screen-Shot-2013-06-26-at-11.01..png
0
 

Author Comment

by:ss80ss
ID: 39276711
here is the code:

<table border="1" cellpadding="1" cellspacing="1" style="width: 900px;">
      <tbody>
            <tr>
                  <td align="LEFT" valign="TOP">
                        <img src="http://dvqlxo2m2q99q.cloudfront.net/000_clients/73148/file/7314813164Ag8b.png" style="width: 150px; height: 165px;" /></td>
                  <td align="LEFT" valign="TOP">
                        <p style="text-align: left;">
                              nice to meet you. i&#39;m sumi &mdash;<br />
                              design enthusiast. management ninja. idea entrepreneur. music fiend.<br />
                              avid linguist. faux wine pro. grammar nazi. star gazer. amateur<br />
                              gastronomist. positive realist. secret optimist.<br />
                              design inspirations deiter rams, tim brown, shepard fairey, lotta<br />
                              jansdotter, barbara kruger, richard seymour, milton glaser, richard<br />
                              branson, banksy, zuzana licko... among others</p>
                        <p style="text-align: left;">
                              things that make me tick good humor, typography, wanderlust, color,<br />
                              unconventional combinations, activism, thunderstorms, music, children,<br />
                              minimalism, innovation, vocabulary, sunsets, flaws, wisdom, positivity,<br />
                              dissonance, t.e.d. talks, collaboration, documentaries</p>
                  </td>
                  <td align="LEFT" valign="TOP">
                        Experience<br />
                        brand analysis, development, management<br />
                        ideation // copywriting<br />
                        team leadership<br />
                        user-centered design<br />
                        information architecture<br />
                        wireframing<br />
                        prototyping<br />
                        industry research // trend hunting &amp; reporting<br />
                        relationship management<br />
                        internal + client process analysis<br />
                        Inspired by<br />
                        business model design<br />
                        user experience<br />
                        service design<br />
                        experience design<br />
                        cross-discipline collaboration</td>
            </tr>
      </tbody>
</table>
<p>
      &nbsp;</p>
0
 

Author Comment

by:ss80ss
ID: 39276713
can someone write the correct code for me? i'm so confused!!
0
 

Author Comment

by:ss80ss
ID: 39276715
if you copy and paste the code i've provided into a text editor and write in the correct code, that would be amazing!! :)

i've increased the point value for the question too because of this extra work :) thank you, amazing coding people!! :)
0
 
LVL 12

Accepted Solution

by:
duttcom earned 500 total points
ID: 39276726
Try this -

<table border="1" cellpadding="1" cellspacing="1" style="width: 900px;">
      <tbody>
            <tr>
                  <td style="vertical-align:top;">
                        <img src="http://dvqlxo2m2q99q.cloudfront.net/000_clients/73148/file/7314813164Ag8b.png" style="width: 150px; height: 165px;" /></td>
                  <td style="vertical-align:top;">
                        <p style="text-align: left;">
                              nice to meet you. i&#39;m sumi &mdash;<br />
                              design enthusiast. management ninja. idea entrepreneur. music fiend.<br />
                              avid linguist. faux wine pro. grammar nazi. star gazer. amateur<br />
                              gastronomist. positive realist. secret optimist.<br />
                              design inspirations deiter rams, tim brown, shepard fairey, lotta<br />
                              jansdotter, barbara kruger, richard seymour, milton glaser, richard<br />
                              branson, banksy, zuzana licko... among others</p>
                        <p style="text-align: left;">
                              things that make me tick good humor, typography, wanderlust, color,<br />
                              unconventional combinations, activism, thunderstorms, music, children,<br />
                              minimalism, innovation, vocabulary, sunsets, flaws, wisdom, positivity,<br />
                              dissonance, t.e.d. talks, collaboration, documentaries</p>
                  </td>
                  <td style="vertical-align:top;">
                        Experience<br />
                        brand analysis, development, management<br />
                        ideation // copywriting<br />
                        team leadership<br />
                        user-centered design<br />
                        information architecture<br />
                        wireframing<br />
                        prototyping<br />
                        industry research // trend hunting &amp; reporting<br />
                        relationship management<br />
                        internal + client process analysis<br />
                        Inspired by<br />
                        business model design<br />
                        user experience<br />
                        service design<br />
                        experience design<br />
                        cross-discipline collaboration</td>
            </tr>
      </tbody>
</table>
<p>
      &nbsp;</p> 

Open in new window

0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39277273
Assuming you can edit your HTML and add some basic CSS, you need to do the following: Add an ID to your table, something like:

<table id="myTable" border="1" cellpadding="1" cellspacing="1" style="width:900px;">

Open in new window

and then style it with the following CSS:

#myTable td { vertical-align:top; }

Open in new window

Job done!
0
 

Author Closing Comment

by:ss80ss
ID: 39277399
Duttcomm, this worked!! Thank you thank you thank you - also for doing the extra work for me. You're a lifesaver.

Thanks to everyone else for your comments and smarts too!! You guys are great here!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML5 frame 5 31
Scroll 5 news at a time. 4 33
Word, Excel, Access icons 4 17
Bootstrap 3 - Style a dropdown 1 15
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question