INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Colspan / rowspan - not lining up?

Colspan / rowspan - not lining up?

(OP)
I have the following

CODE

<table class="heading">
                        <thead>
                            <tr>
                                <th class="firm" rowspan="2">Firm</th>
                                <th class="adviser" rowspan="2">Adviser</th>
                                <th class="cnt" title="Submissions" rowspan="2">Subs</th>
                                <th class="cnt" title="Cases Sent for Checking" rowspan="2">Sent</th>                                
                                <th class="colspan3" title="" colspan="3">To be checked</th>                                
                                <th class="cnt" title="Cases Checked" rowspan="2">Check</th>                                
                                <th class="colspan3" title="" colspan="3">Actually checked</th>  
                                <th class="cnt" title="Total No. of Cases Overdue" rowspan="2">Over</th>                                                               
                            </tr>
                            <tr>                                

                                <th class="cnt" title="Risk Only Checks">Risk</th>                            
                                <th class="cnt" title="Standard Checks">Std</th>
                                <th class="cnt" title="Full Checks">Full</th>  
                             
                                <th class="cnt" title="Risk Only Checks">Risk</th>                                                             
                                <th class="cnt" title="Standard Checks">Std</th>
                                <th class="cnt" title="Full Checks">Full</th>
                                                      
                            </tr>
                        </thead>
                    </table> 

I thought that would produce a table heading with 12 columns and two rows

1st row = first 4 cols span two rows, the next spans 3 cols, the next two rows, the next spans 3 cols and the last spans two rows.
2nd row = first 4 cols covered by above, then 3 cols, then covered by above, then 3 cols, then covered by above.

In essence Risk / Std / Full should line up under 'To be checked' and 'Actually checked', only they don't the second row starts aligned hard left under 'Firm' the first column?

What am I doing wrong?

Thanks,
1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

RE: Colspan / rowspan - not lining up?

Hi

I am afraid I do not understand you. You want this :
┌──────┬─────────┬──────┬──────┬───────────────────┬───────┬───────────────────┬──────┐
│      │         │      │      │ To be checked     │       │ Actually checked  │      │
│ Firm │ Adviser │ Subs │ Sent ├──────┬─────┬──────┤ Check ├──────┬─────┬──────┤ Over │
│      │         │      │      │ Risk │ Std │ Full │       │ Risk │ Std │ Full │      │
└──────┴─────────┴──────┴──────┴──────┴─────┴──────┴───────┴──────┴─────┴──────┴──────┘
 

And the markup you posted does not render like above ?

Well, http://dabblet.com/gist/8824249 does for me. In Gecko, Presto, WebKit and Trident.

Are you sure the CSS does not change the display of any of those elements ?

Feherke.
feherke.ga

RE: Colspan / rowspan - not lining up?

(OP)
That's exactly how it should look and does only in IE, looks like this in Opera, FF and Chrome...

┌──────┬─────────┬──────┬──────┬───────────────────┬───────┬───────────────────┬──────┐
│ Firm │ Adviser │ Subs │ Sent │ To be checked │ Check │ Actually checked │ Over │
|______|_________|______|______|___________________|_______|___________________|______|
│ Risk │ Std │ Full │ Risk │ Std │ Full│
└──────┴─────────┴──────┴──────┴──────┴─────┴

Yes all of them have display:inline-block;

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

RE: Colspan / rowspan - not lining up?

Hi

Quote (1DMF)

Yes all of them have display:inline-block;
Just like width has no effect on inline elements, colspan has no effect on anything else then table-cell elements. Personally I do expect the browsers render them that way.

Feherke.
feherke.ga

RE: Colspan / rowspan - not lining up?

Hi

Quote (1DMF)

ok thanks, thought the 'block' bit resolved this. wrong again!
Sorry, I am not really fresh today. You mean that after applying CSS th { display: block } the column spanning works again ?

Feherke.
feherke.ga

RE: Colspan / rowspan - not lining up?

(OP)
no; the 'block' part of inline-block.

I changed it to table-cell and it is spanning correctly.

Though lining up a table head with a table body to enable a fixed heading with an overflow scroll drives me nuts.

Why the hell you can't overflow-scroll a tbody is beyond me, leaving the thead part of the same table is beyond me.

Do you ever have those days where it feels like you've worked ya butt off but got nothing done?

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music

RE: Colspan / rowspan - not lining up?

Hi

Oh, the scrolling table. Tried it some time ago. I managed to make two versions : one functional and one portable. Never succeeded in combining both features in one solution. sad

Feherke.
feherke.ga

RE: Colspan / rowspan - not lining up?

If you actually need a tabular layout to display tabular data why not just use a table?


It's not a mortal sin, neither and the style police can't charge you with anything.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Colspan / rowspan - not lining up?

Quote (ChrisHirst)


If you actually need a tabular layout to display tabular data why not just use a table?

He is using a table.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close