Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Table for content spacing

Featured Replies

I read somewhere once that the use of <table> for content positioning is bad practice. Would you agree?

 

I've had a few issues recently with positioning / alignment, and keep remembering a site I did a while ago using the table method, which solved a lot of problems, so i'm tempted to try it again. Bad idea?

You should only use tables for tabular data. If you're not using tabular data, then you should really be using other, more semantic methods (i.e. divs with css floats and positioning). So yeah, I personally think it's bad practice!

 

For your issue, I suppose it depends on the nature of your problem, whether you would deem tables a suitable method for design. I was just reading through this, which brings up some good points: http://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html

As stated above tables are not semantic and should not be used for content layout.

 

You should learn about the CSS box model and how positioning works and relates to that.

 

A good resource for this http://css-tricks [dot] com/the-css-box-model/

Divs or sections (HTML5) should be used for page structure and tables should be used for any kind of data. On disadvantage of using tables over divs is that the layout algorithm for tables is much harder and the browser often ha to wait for the whole table to load before it can begin to layout the content. Stick with divs/sections

Using tables for content positioning is not much of a good idea.

 

I'll just throw out a few disadvantages of tables:

- Initial coding time

- Maintainability

- High load times

- (Often times) Strictly fixed layout for dynamic media

 

If a year from now all the issues with responsive web design is fixed and it become the new industry standard then <tablels> (and sometimes, shockingly <area>) for layout would be thrown wayyyy out the window.

Edited by _Jabba_

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.