html - How to implement a table structure using CSS -


<table>   <tr> <td></td> <td></td> </tr> </table> 

how replicate kind of structure using <div> or <span>'ed css

depends on you're trying replicate.

with simple example you've given, it's not easy tell you're trying achieve, if you're tring put 2 blocks side side (ie columns in page layout), need create couple of <div> elements , style them using css appear next each other. depending on want, there number of ways stylesheets.

one option set them both float:left;. use width:... set how wide want them in pixels or percent.

if float complex (and quite big jump in concept table-based layout), may want consider using display:inline-block; instead. allow <div>s positioned next each other, gives more control on how position themselves.

finally, if contents of <table> table of data, don't afraid of keeping in table - <table> tag , friends still valid html, , putting tabular data table still thing.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -