CSS layout versus table layout? -...

User 2733 Photo


Ambassador
426 posts

Cary wrote:
Actually, layers, or absolutely positioned divs, should be avoided whenever possible. They have their place, but often they end up being used where they shouldn't be, and then pages break when viewed with different font sizes. This is why VSD only works at 96dpi.


Cary, your post is unsubstantiated. Ever heard of the z-index? Absolutely positioned divs should be avoided? Take a look at this code..

<div style="margin:0;position:relative;width:1px;height:1px;border:0px solid black">
<div style="padding:0;position:absolute;width:1px;height:1px;left:0px;top:0px;border:0px solid black;">
<p>my content</p>
</div>
</div>


Place that code above or below any element in a page and position it absolutely using the left and top values on the inner div and get pixel perfect precision in any browser. Tested, tried and true for about 10 years now. If abs divs have their place, where? You didn't say. You also didn't say where not to use them.

In regards to different font sizes, you can set the font size for a web page in a style sheet that's consistent in all browsers released in the past 5-7 years. Look up Eric Meyer's CSS reset.

I'm not sure how VSD and font size have anything to do with web page development. You're probably speaking about your system font size.

I'm not picking a fight here but it's posts like this that get my blood going.


G'kar,

I'd consider CSS strongly simply because you will spend double the amount of time styling a table than you would a div container. Think of it this way... if you feel you have more control over a layout using tables, try layering a table over another without using CSS. Cut out the middle-man (table) and go straight to the supplier (CSS).

Be well.
Let's not get all hurt.
User 463058 Photo


Ambassador
1,086 posts
Online Now

David Sellers wrote:
Cary, your post is unsubstantiated.


Actually, the web is full of substantiating evidence. The article, Absolute Positioning Pitfalls, tries to answer some of the questions you've raised about when to use absolute positioning.

http://www.tyssendesign.com.au/articles … -pitfalls/

David Sellers wrote:
Ever heard of the z-index?


Yep.

David Sellers wrote:
Absolutely positioned divs should be avoided?


..."whenever possible."

David Sellers wrote:
Take a look at this code..

<div style="margin:0;position:relative;width:1px;height:1px;border:0px solid black">
<div style="padding:0;position:absolute;width:1px;height:1px;left:0px;top:0px;border:0px solid black;">
<p>my content</p>
</div>
</div>


Place that code above or below any element in a page and position it absolutely using the left and top values on the inner div and get pixel perfect precision in any browser. Tested, tried and true for about 10 years now. If abs divs have their place, where? You didn't say. You also didn't say where not to use them.


Entire books and css courses are spent answering these questions, which you seem to believe I or anyone else can condense into a single forum post. Just look at the code you posted above. You make it sound like it can simply be dropped in a page, and the content won't budge, which we both know isn't true, since the relatively positioned outer divs will move and flow with the rest of the page elements.

David Sellers wrote:
In regards to different font sizes, you can set the font size for a web page in a style sheet that's consistent in all browsers released in the past 5-7 years. Look up Eric Meyer's CSS reset.


Note that his reset, and his page designs, allow him to better control relative font sizes, but the base font size is controlled by the visitor. So, if someone with poor eyesight uses a larger base font size in the browser, the page doesn't fall apart and display overlapping text content.

David Sellers wrote:
I'm not sure how VSD and font size have anything to do with web page development.


Basically, VSD, which is used for web page development, requires 96dpi displays because its fonts sizes are defined as "points" rather than "ems", and point sizes don't mean anything apart from dpi. When you change your display's dpi, text content either shrinks or overlaps other page elements.
User 364143 Photo


Guest
5,410 posts

Sweet, an E-Rumble. Let me jump in here:

Hey Dave Thompson, your tables suck and are only used by noobs!

Anybody else want some?

Jo Ann, just hush a minute.

Spinny, get a haircut.

Scott, grow some hair.

J/K :lol:

It's all Dr Longo's fault. He started it with "My website is better than yours".

CoffeeCup... Yeah, they are the best!
User 603315 Photo


Registered User
938 posts

Thanks for all your opinions everyone. I seemed to of started a bit of a heated debate, that wasn't my intention I just wanted to know what you all thought of the way forward.
CSS it is then. I'll concentrate my efforts that way and leave those tables behind :)
User 597929 Photo


Registered User
1,332 posts

There are some tech dichotomies that take on the heat of a religious war. Mac vs PC, vi versus emacs, tastes great versus less filling, and now tables versus CSS. :cool:
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 463058 Photo


Ambassador
1,086 posts
Online Now

Now that's hyperbole.
User 597929 Photo


Registered User
1,332 posts

What? Was it the beer reference? ;)
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 92156 Photo


Registered User
272 posts

Spinny wrote:
There are some tech dichotomies that take on the heat of a religious war. Mac vs PC, vi versus emacs, tastes great versus less filling, and now tables versus CSS. :cool:

Spinny you forgot iPhone vs BlackBerry et al, and then there is this: http://meiert.com/en/blog/20080419/rese … s-are-bad/

PS I like the graphics on your site, Spinny.
Makes me seriously think of dumping tables sooner than I intend.

Hey Tom no fighting please - but if you insist on a physical rumble, can I come and watch?


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.