[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Aligning Table Data - Top

Posted on 2002-03-14
10
Medium Priority
?
244 Views
Last Modified: 2010-04-09
It seems simple enough, but, everthing I try, comes out Centered, sigh.. any help? basically, the data always ends up in the middle, can it be aligned to the top, like in an excel cell??

Here's my table, well, at least the first table row.

<b>Class of Construction</b><P>

<table width="100%" border="1" cellspacing="1" cellpadding="1">
     <tr>
       <td>
         Class
       </td>
     
       <td>
         Description
       </td>

       <td>
         Frame
       </td>

       <td>
         Floor
       </td>

       <td>
         Roof
       </td>

       <td>
         Walls
       </td>
     </tr>        

     <tr>
       <td>
         A          
       </td>

       <td>
               Class A buildings have fireproofed structural steel frames with reinforced          

          concrete or masonry floors and roofs.<P>

              These are typically high-rise or heavy industrial type buildings. (Offices,      

            Hotels, Apartment & Condos)
        </td>

       <td>
              Structural steel columns and beams, fireproofed with masonry, concrete
              plaster, or other non-combustible material
       </td>

       <td>
              Concrete or concrete on steel deck foreproofed.
       </td>

       <td>
              Formed concrete, pre-cast slabs, concrete or gypsum on steel deck,                  

     fireproofed.
       </td>

       <td>
          Nonbearing curtain walls, masonry, concrete, metal and glass panels, stone, steel

          studs and masonry, tile or stucco, etc.
       </td>
     </tr>

</table>


Thanks in advance... if this is more than a 50 point question, please let me know, I will gladly upgrade..

nfroio
0
Comment
Question by:nfroio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 5

Author Comment

by:nfroio
ID: 6866387
Well, got it sorted, guess that you have to valign=top, all table data records before it takes effect.. sigh.. its been a really, really long day, and i have been working on this super long form for over 7 hours straight..

thanks all..

nfroio
0
 
LVL 30

Expert Comment

by:third
ID: 6866607
if you're formatting valign top for the whole row, you can set it once it the <tr> tag.

so instead of using,
<tr>
  <td valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>

u can use,

<tr valign="top">
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>

much easier and neat isn't it?

"take a rest, your mind needs it..."
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 200 total points
ID: 6867141
you can make your life even easier with CSS for the newer browsers

<style>
td {vertical-align:top;}
</style>

and you don't have to write the attribute for every td or tr element
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:DreamMaster
ID: 6867528
third,

Are you sure that <tr valign="top"> works in all browsers? I seriously believe it will give troubles in Netscape versions 4..

Max.
0
 
LVL 30

Expert Comment

by:third
ID: 6867585
i haven't seen on my comment above stating that it works on all browsers. besides it doesn't give only trouble in NS4 but NS6.2 as well. haven't tried on NS6 but most probably since it doesn't work on NS6.2 it wont work i believe.
0
 
LVL 5

Author Comment

by:nfroio
ID: 6868006
Thanks guys, I will look into those two options, as I have two huge tables to work on, and either of those will save me time...

As for Netscrap compatibility, no need, all of the folks in our offices use IE...

thanks again...  will be back...

nfroio
0
 
LVL 5

Author Comment

by:nfroio
ID: 6868419
b1xml2,

I am not familiar w/ CSS, where would I insert that Style tag? Before the rows that I want the text to be positioned on the top? If I use that tag, can I still use the <td valign=center> tag option for the first header row??

Thanks,

nfroio
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6876013
style tags will go in the <head> portion like this:


<html>
  <head>
    <style>
      *********
      *********
      *********
    </style>
  </head>

  <body>

  </body>
</html>
lhn
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6876289
so now i think ill post the complete code you could ever need.

<style>
table{vertical-align:top;}
td{vertical-align:top;}
tr{vertical-align:top;}
th{vertical-align:top;}
</style>
0
 
LVL 5

Author Comment

by:nfroio
ID: 6877925
b1xml2,

thank you for the tip, i have decided to use CSS tags and it has helped me immensely, finally finished up that form, and it looks great...


nfroio
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

656 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