Forum Moderators: open

Message Too Old, No Replies

DIVs

This may sound stupid!

         

steelegbr

7:16 pm on Jun 20, 2004 (gmt 0)

10+ Year Member



I mainly write all of my websites with tables to control the layout.

My friend recommended me to change to DIVs.

I know this may sound stupid but what are DIVs, how are they used properly and what do they do?

Thanks in advance.

PatrickDeese

7:45 pm on Jun 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think he probably meant that you should switch from tables to CSS - which can imitate table layout with divs --

Webmasterworld has a good CSS forum:

[webmasterworld.com...]

stever

7:50 pm on Jun 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Firstly, here is the official word. It may look confusing and longwinded but what you have on that page are the building blocks of creating a web page.

[w3.org...]

You will see that it defines divs as a way to group other content together - in a similar way to how you have been using tables for controlling layout.

In answer to your more global question, I can think of no better way than to start going through the library of the CSS forum on this site for a grounding in non-table layout.

steelegbr

1:46 pm on Jun 21, 2004 (gmt 0)

10+ Year Member



Thanks for all the replys. Just one question though, how compatable are divs/CSS with older browsers?

DrDoc

2:50 pm on Jun 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It all depends on how advanced CSS features you plan on using. Some of them are not even compatible with the latest browsers ;)
But, don't let that scare you off! CSS based layouts have many advantages over old-skool layouts. CSS has some support in older browsers, depending on how "old" we're talking, and (again) how advanced your CSS needs to be.
Just beware -- once you switch over to CSS based layouts, you will never look back ;)
Also, the biggest obstacle for someone trying out CSS based layouts for the first time is that they attempt to basically emulate the table layout. CSS requires a completely different mindset and a new way of thinking. Content becomes increasingly important, and the focus lies on the various pieces of content blocks/sections. Once you have identified those you can worry about how to lay them out.

For some additional food for thought, take a look at the CSS Forum Charter [webmasterworld.com].

;)