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.

Div instead of tables

Featured Replies

Can anyone tell me how to make a menu box using divs instead of tables or at least point me to a tutorial on it? What I wantto do is is make a 5-6 column table with around 4-5 rows each space haveing a text link, but in divs instead of tables.

 

:huh::huh::huh:

If you are going to store tabular data in rows and columns, use tables...

You could use a list

 

<ol id="grid">
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ol>

 

20 links there (5x4)

 

ol#grid{width:500px;}

ol#grid li{width:100px; float:left;}

 

take the width of the ol and divide by however many columns you want to get the width of the li.

 

So there we have 5 columns (500/5 = 100) which means 4 rows.

 

That'd work, although a table might be easier for you, idk.

 

P.S i only learnt this today :p courtesy of bluedreamer i think?

  • Author

Ok... but I thought you guys said tables were bad .... :huh::huh:

They're bad for design, not for tabular data (which is what they've always been intended for), although some purists insist on using css for tabular data.

  • Author
They're bad for design, not for tabular data (which is what they've always been intended for), although some purists insist on using css for tabular data.

 

 

OH.. ok :rolleyes:

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.