Table with CSS

Reply

Join Date: Dec 2004
Posts: 234
Reputation: cancer10 is an unknown quantity at this point 
Solved Threads: 0
cancer10's Avatar
cancer10 cancer10 is offline Offline
Posting Whiz in Training

Table with CSS

 
0
  #1
Jul 20th, 2006
How do they make tables with only CSS without using HTML Tables? is it possible to make a table as shown on the screenshot below with only CSS and NO HTML? if yes how?


http://photobag.2plans.com/images/75427379.jpg




Thanx in advance
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 232
Reputation: Dogtree is an unknown quantity at this point 
Solved Threads: 3
Dogtree's Avatar
Dogtree Dogtree is offline Offline
Posting Whiz in Training

Re: Table with CSS

 
0
  #2
Jul 20th, 2006
>> How do they make tables with only CSS without using HTML Tables?
Well, if you need a table, you need a table. But you can do typical table layout stuff with CSS pretty easily. Just make good use of divs.

>> is it possible to make a table as shown on the screenshot below with only CSS and NO HTML?
Absolutely! You can do it a bunch of ways. Probably the easiest would be something like this.
HTML and CSS Syntax (Toggle Plain Text)
  1. <div>
  2. <span class="box-title">Title Stuff</span>
  3. <div class="box">
  4. <ul class="box-list">
  5. <li>Item 1</li>
  6. <li>Item 2</li>
  7. <li>Item 3</li>
  8. <li>Item 4</li>
  9. <li>Item 5</li>
  10. </ul>
  11. <span class="box-link">Link&gt;&gt;</span>
  12. </div>
  13. </div>
Then the CSS is a simple div with carefully crafted borders and a float for the "title" element. Then inside the div is just a bullet list with a cut left margin and link below it with a large left margin.
HTML and CSS Syntax (Toggle Plain Text)
  1. .box {
  2. width:5em;
  3. border:solid #0000FF;
  4. border-top-width:1.5em;
  5. }
  6.  
  7. .box-title {
  8. float:left;
  9. margin-left:.2em;
  10. margin-top:.3em;
  11. color:#FFFFFF;
  12. }
  13.  
  14. .box-link {
  15. padding-top:-1em;
  16. margin-left:2em;
  17. padding-right:.2em;
  18. padding-bottom:.2em;
  19. }
  20.  
  21. .box-list {
  22. list-style-type:circle;
  23. margin-left:-2em;
  24. margin-bottom:.5em;
  25. }
With tweaking you can make it more elegant, of course.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 6
Reputation: babyboy808 is an unknown quantity at this point 
Solved Threads: 1
babyboy808 babyboy808 is offline Offline
Newbie Poster

Re: Table with CSS

 
0
  #3
Aug 8th, 2006
Anything that tables can do... CSS can do better
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC