Jump to content

"colspan" in css tables?


jayjay960

Recommended Posts

So, I need a table to look like this:

 

#############
#     #     #
#############
#     #     #
#############
#           #
#############

 

Now just using plain html, that would be easy enough to do, just adding colspan="2" to the last cell, however, I'm using css tables, as in, this is what my table looks like:

<style>
.table { display: table; }
.tr { display: table-row; }
.td { display: table-cell; }
</style>

<div class="table">
<div class="tr"><div class="td">Cell 1</div><div class="td">Cell 2</div></div>
<div class="tr"><div class="td">Cell 3</div><div class="td">Cell 4</div></div>
<div class="tr"><div class="td">Cell 5</div></div>
</div>

 

Now, what I want to know is if there is a CSS equivalent to colspan that lets one cell take up more room. I've tried just setting width: 100%;, and using the html colspan="2" but neither work. I have the CSS2 specification pdf which is helpful, but I haven't been able to find any answers in there. Can anyone help?

Link to comment
Share on other sites

  • 2 weeks later...

Please could someone have a look at this and advise re the colspan bit... is this allowed??

body {

font-family: Verdana, Arial, Helvetica, sans-serif;

}

h1 {

colour: #FF0000;/*red*/;

background-color: #3333;/*grey*/;

}

th, td, colspan {

border: 1et solid #666666;

}

 

p, li, dd, dt {

color: #000000;

background-color: #FFFFFF;

font-size: 1em;

font-style: normal;

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.