SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    London
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a table with CSS and <div>s

    I need to create a table using <div>s and putting table commands into the CSS. I don't want to use float, or position or anything like that - it needs to be an actual table layout, but with <div>s (it's a long story why...).

    I've seen this being done before but I can't remember how to do it. I've been hunting around on the web for this for a while.

    Cheers
    Webcredible for usability & accessibility.
    Read all about the Disability Discrimination Act (DDA)

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,873
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Ie doesn't support the display:table command so you can only really do it on browsers such as mozilla.

    You can of course construct a layout using normal elements but they won't exhibit the specific characteristics of a table without using display:table and display:table-cell commands.

    Perhaps if you had an example of what you were trying to do then an alternative solution might be offered if at all possible .

    Paul

  3. #3
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do you need to create a table using CSS? If it's to hold tabular data, just use a <table>.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Why do you need to create a table using CSS? If it's to hold tabular data, just use a <table>.
    Seconded.

  5. #5
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,204
    Mentioned
    106 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Why do you need to create a table using CSS? If it's to hold tabular data, just use a <table>.
    Thirded.

    Tables are not depreciated in the newer standards. They are simply to be used for what they're intended for: holding tabular data. It makes no sense to reinvent the wheel simply to invoke happy happy joy joy thoughts in your brain.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,873
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Hi,
    Quote Originally Posted by trenton
    it's a long story why...).
    Looks like you'll have to tell them all why now

  7. #7
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveMaxwell
    Tables are not depreciated...
    Deprecated. Tables could never be considered an asset with value...
    Last edited by Buddy Bradley; Oct 11, 2004 at 08:06. Reason: fix spelling


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
  •