Forum Moderators: not2easy

Message Too Old, No Replies

CSS syntax

         

angel777

9:03 am on Oct 21, 2008 (gmt 0)

10+ Year Member



HI may i know whether i can use <div> and <table><tr><td> at the same time in a page like below?

<div style="visibility: visible;" id="bodyContent">
<div id="top">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="783">
<tbody><tr>
<td class="topLine">

alt131

10:53 am on Oct 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi angel777,

To answer your question, yes you can. However, my thought is whether you should.

I advocate avoiding inline styles, using the least number of classes, ids and "structural" elements as possible, semantic markup, and only using tables to display information that properly belongs in a table.

The code snippet posted looks like it could be simplified - if you would like some suggestions post a bit more code and a description of what you are trying to achieve.

essiw

1:05 pm on Oct 22, 2008 (gmt 0)

10+ Year Member



yes you can, if you close them correctly ;) btw post your doctype... and i don't know why you use this tag: <tbody> because i have not even seen it before... (i understand that it means tablebody)

swa66

2:55 pm on Oct 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<tbody> and it's friends <thead> and <tfoot> are part of html since at least HTML4.
The most useful idea I've had for them was to set overflow:scroll on tbody, but unfortunately browsers out there are by far not close to doing anywhere near the right thing.