PDA

View Full Version : Table VS apDiv


eag58
04-27-2009, 04:51 PM
Hi i am starting to create a new website but im debating whether to use tables or apdivs. I need my main content to be aligned in the middle of the page and i want the background to be resized as the user resizes their windoen, should i use tables or apdivs?

Here is an example of what im trying to accomplish:

http://www.bgcportland.org/

Thanks,
Edgar Gonzales

Corrosive
04-27-2009, 05:14 PM
Hi i am starting to create a new website but im debating whether to use tables or apdivs. I need my main content to be aligned in the middle of the page and i want the background to be resized as the user resizes their windoen, should i use tables or apdivs?

Here is an example of what im trying to accomplish:

http://www.bgcportland.org/

Thanks,
Edgar Gonzales

Use neither. Relative or standard divs are the way to build a site structure. APdivs are OK once in a while if you know what you are doing. Don't use tables for layout.

DWcourse
04-27-2009, 05:22 PM
Corrosive is correct and you can start with Dreamweaver's built in 1 column fixed, centered, header and footer layout.

sayian_z
04-27-2009, 10:13 PM
Use neither. Relative or standard divs are the way to build a site structure. APdivs are OK once in a while if you know what you are doing. Don't use tables for layout.
how to use relative or standard divs?
Also, should we position them by typing the pixle position :confused: because I used div from Insert-->Layout Object-->Div Tag
and it's driving me crazy :(

edbr
04-28-2009, 12:40 AM
standard divs in my book would be relative positioned. DW has a strange ay of using Apdivs as a default IMO.
relative divs are not positioned by pixels, they are 'relative to other bobjects so ex : a left floated div folowed by another left floated div will appear inline.
absolute dive are positioned by pixels from left top etc. they use athere reference point either from the whole page if in the body but are best used in a relative dive where they take the point from the boundarys of the div

DWcourse
04-28-2009, 01:59 AM
But absolutely positioned divs are useful when there is a need to overlap divs. I just wouldn't rely on them for the whole site layout.

edbr
04-28-2009, 04:31 AM
But absolutely positioned divs are useful when there is a need to overlap divs. I just wouldn't rely on them for the whole site layout.
agreed, i use them when i want to position an element such as an image somewhere in a div

Corrosive
04-28-2009, 06:19 AM
how to use relative or standard divs?
Also, should we position them by typing the pixle position :confused: because I used div from Insert-->Layout Object-->Div Tag
and it's driving me crazy :(

Yes, as the other guys have said a relative (yep, standard in my book as well ed) divs are positioned relative to each other. It is the way to build a site. If someone has poor eyesight and has their browser set at 20px text you want your site to still be readable. Apdivs will overlap in this case but relative will push down on each other and the site will 'grow' with the text. It may not be pretty but it will still be fully readable.

So, with the knowledge that relative positioning 'divides' up your screen and that relative divs shouldn't occupy each others space you should be able to construct a simple two column layout with a header and a footer. Start with a wrapper and work from there...

http://www.dreamweaverclub.com/css-center-content.php

Corrosive
04-28-2009, 06:22 AM
DW has a strange ay of using Apdivs as a default IMO.


It's because they want Noobs to think they can 'drag and drop' a website into place and so positioning Dreamweaver as the 'must have' design tool for those who know nothing about websites.

It is a good tool but often people think 'I'll have my site up in a weekend and I won't need to know any code'...we see the results of that every day on this site :wink: