SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    May 2006
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using colspans and rowspans

    Hi! I have been thinking about my problem for quite a while, however my result was 0. The thing is - I'm trying to create the base of my page using tables - everything seemed to be easy until the moment, where I needed to use colspan and rowspan at the same time. Actually it's hard to explain what I want to achieve, that's why I attached an image, that ilustrates my idea. In this image I have drawn a simple table (in original it's 2 columns and 2 rows - together 4 cells) - I understand how to merge 2 columns or 2 rows with the help of rowspan and colspan, but is there a possibility to merge columns and rows at the same time, so that the only cell would be the "CELL" (look at the image) cell. Any advice appreciated.
    Attached Images Attached Images

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,799
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    No you can't span both rows and columns at the same time unless spanning an entire rectangular area.

    Where you have a table that needs the cells arranged like that you can either span the column and repeat the column value in the bottom right cell or span the row and repeat the row value in the top left cell. Which way around you'd choose would depend on whether people are more likely to be searching the data based on the column headings or the row headings.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •