Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

aligning information with headings in a table - easy and urgent

Posted on 2004-07-30
8
Medium Priority
?
216 Views
Last Modified: 2011-09-20

Hi, if I have a table that displays headings with three fields of information for each heading like so:
|heading one|heading two|heading three|
|va |va |var  |va |va |var |va |va  |   var|

Ive tried numerous of doing ways of doing this but always end up with:
|heading one|heading two|heading three|
|va |va|var|va |va |var|va   |va|var |
ie the headings are not aligned with the information.

How can I write html code to achieve this?

Thank you
0
Comment
Question by:VolSpeak
[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
  • 7
8 Comments
 
LVL 13

Expert Comment

by:flow79
ID: 11680609
<table summary="" border="1">
<thead>
      <tr>
            <th style="width: 266px;" colspan="3">Heading 1</th>
            <th style="width: 266px;" colspan="3">Heading 2</th>
            <th style="width: 266px;" colspan="3">Heading 3</th>
      </tr>
      <tr>
            <th>SubHeading 1</th>
            <th>SubHeading 2</th>
            <th>SubHeading 3</th>
            <th>SubHeading 4</th>
            <th>SubHeading 5</th>
            <th>SubHeading 6</th>
            <th>SubHeading 7</th>
            <th>SubHeading 8</th>
            <th>SubHeading 9</th>
      </tr>
      </thead>
      <tbody>
        <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
            <td>Data</td>
      </tbody>
</table>
0
 
LVL 13

Expert Comment

by:flow79
ID: 11680672
if you want all your headings to be one color (to seperate from the DATA) make it
<thead bgcolor="#ccffff">

0
 
LVL 13

Expert Comment

by:flow79
ID: 11680680
or else or HTML/CSS to style the table in any manner youd like.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Expert Comment

by:flow79
ID: 11680712
also, i just looked at my code, you need to add: <tr> tags around each row of td's like so:

     <tr>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
          <td>Data</td>
      </tr>

Sorry about forgetting the tr
0
 
LVL 13

Accepted Solution

by:
flow79 earned 500 total points
ID: 11680746
you could also just keep on iterating it and making more and more subheading sets: such as (this is just to show you how far thead and tbody will go)

<table summary="" border="1" cellpadding="4">
<thead bgcolor="#ccffff">
      <tr>
            <th style="width: 266px;" colspan="9">Heading 1</th>
            <th style="width: 266px;" colspan="9">Heading 2</th>
            <th style="width: 266px;" colspan="9">Heading 3</th>
      </tr>
      <tr>
            <th colspan="3">SubHeading 1</th>
            <th colspan="3">SubHeading 2</th>
            <th colspan="3">SubHeading 3</th>
            <th colspan="3">SubHeading 4</th>
            <th colspan="3">SubHeading 5</th>
            <th colspan="3">SubHeading 6</th>
            <th colspan="3">SubHeading 7</th>
            <th colspan="3">SubHeading 8</th>
            <th colspan="3">SubHeading 9</th>
      </tr>
      <tr>
            <th>SubHeading 1</th>
            <th>SubHeading 2</th>
            <th>SubHeading 3</th>
            <th>SubHeading 4</th>
            <th>SubHeading 5</th>
            <th>SubHeading 6</th>
            <th>SubHeading 7</th>
            <th>SubHeading 8</th>
            <th>SubHeading 9</th>
            <th>SubHeading 1</th>
            <th>SubHeading 2</th>
            <th>SubHeading 3</th>
            <th>SubHeading 4</th>
            <th>SubHeading 5</th>
            <th>SubHeading 6</th>
            <th>SubHeading 7</th>
            <th>SubHeading 8</th>
            <th>SubHeading 9</th>
            <th>SubHeading 1</th>
            <th>SubHeading 2</th>
            <th>SubHeading 3</th>
            <th>SubHeading 4</th>
            <th>SubHeading 5</th>
            <th>SubHeading 6</th>
            <th>SubHeading 7</th>
            <th>SubHeading 8</th>
            <th>SubHeading 9</th>
      </tr>
      </thead>
      <tbody>
       <tr>
        <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
            <td><div align="center">DATA</div></td>
       </tr>
      </tbody>
</table>
0
 
LVL 13

Expert Comment

by:flow79
ID: 11692579
hello?  any response?
0
 
LVL 13

Expert Comment

by:flow79
ID: 11763288
did this help you VolSpeak?  I have provided code above and beyond your requirements.  Please respond.
0
 

Author Comment

by:VolSpeak
ID: 11852251

Sorry, i have very limited internet access and am just testing your response now, please be patient

Thanks :)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

670 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