Hi
I use dreamweaver to do a football/soccer website in the UK and i am presently trying to do it all in CSS, and that is where my problem lies, well its 2 fold actually, 1 what do other web designers prefer? all table? or all css?, or a mix of 2? the reason im asking is probably best described in my second part of the problem, while doing parts in css i can get it to work just as well but quicker using a table with css to control it, and when inserting a league table, usually 13 rows and up to 7 columns a copy and paste from excel and removel of some legacy code does the trick, am i just as well to continue doing it this way or is there a easy way to do it in css? can a table be converted in anyway to ccs, or is it just the way im beginning to think .........its a waste of time trying to do it in css?
Thanks in advance :)

Dani AI

Generated

raised the common practical trade-off: fast copy/paste from Excel versus clean, maintainable markup. For a league table (13 rows × ~7 columns) the clearest, most future‑proof choice is to keep the content as an HTML table and move all presentation into CSS. That preserves semantics and accessibility, makes sorting/filtering straightforward later, and keeps layout (the rest of the page) in CSS rather than in table cells. ’s preference for tables is reasonable for this case, and ’s point about not using tables for non‑tabular layout remains important.

Recommended workflow (practical, low friction)

  • Export the spreadsheet to CSV and have the site generate the table HTML server‑side, or paste as plain text and wrap the rows in a semantic table.
  • Ensure structure: add a caption, use <thead>/<tbody>, and <th scope="col"> or <th scope="row"> so screen readers can interpret headers.
  • Strip any inline styles added by Excel/Dreamweaver; keep styling in CSS classes.
  • For numeric columns add consistent numeric content (or data-* attributes) to support correct sorting later.
  • For small sites, client‑side sorting/filtering can be progressive enhancement; it is not required initially.

Example skeleton (keeps semantics; style separately)

<table class="league">
  <caption>Premier Division — 2008/09</caption>
  <thead>
    <tr><th scope="col">Pos</th><th scope="col">Team</th><th scope="col">P</th><th scope="col">GD</th></tr>
  </thead>
  <tbody>
    <tr><th scope="row">1</th><td>Example FC</td><td>26</td><td>+34</td></tr>
  </tbody>
</table>

.table-wrap { overflow-x: auto; } /* simple mobile support */

Troubleshooting notes: Dreamweaver/Excel paste often injects inline styles and extra tags—use a sanitizer or simple regex to remove style="..." and tidy markup. For responsive needs, allow horizontal scroll on small screens or implement a stacked-card pattern. Authoritative guidance on table semantics and accessibility: see the WAI tutorial and MDN documentation for <table>.

Recommended Answers

All 2 Replies

in ur case ill prefer to use table instead css.

Let's get rid of this "table vs css" idea. It's bogus.

Use table for tabular data, and other things that must be in clear rows and columns. You can use css to format the table nicer. Even rows of buttons are nicer with tables keeping them in line.

If you need columns, and need them to all be the same height, use tables.

Use css instead of tables where tables were wrongly used to create stuff that is not tabular in nature.

Web designers used to use tables to create margins, borders, padding, and other formatting functions that were originally not provided in HTML. These are the only tables that should be changed to pure css.

commented: I agree with you +7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.