Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > CSS
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 03-15-2001, 06:48 AM
  #1
Marlboro
Adept (Level 5)
 
Join Date: Jan 2001
Location: USA - WV
Posts: 43
iTrader: (0)
Marlboro is on a distinguished road
Talking

Well here it is, play with it, cut it up, tear it apart, complain like a pro about its shortcomings or just enjoy. I've decided to post my code for liquidizing DIVs for IE5/IE5.5 and NS6.

This awesome script allows you to reflow and resize layers (divs only!) regardless of where and how the divs are positioned OR WHAT RESOLUTION/WINDOW SIZE THE USER HAS - and the really cool thing - it works!

take a look at http://www.i-81.net/marlboro/autoresize.asp and tear it apart guys (and gals).

Dont ask for support though its hard enuff for me to understand the code and i wrote it! But in nutshell, you need to know the dimensions of the layers you want and how you want them to behave (I did a little extra and demonstrate stopping the resize when the page is less than 530 pixels in width (to force the user to scroll -could come in handy)).

Each div examines either the height and/or width of the div above and/or aside of it for logic, it then dynamically resizes accordingly.

If you use it in your site - please let me know (and be so kind as to reference me as the author)

So visit the page, resize your window and adjust the height and width of your window and watch, is this a peice of work or what.

enjoy
__________________
Mark Wray
XBDHTML Guru
Marlboro is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-15-2001, 01:59 PM
  #2
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
I guess I dont understand what that accomplished that a table structure couldn't have?
Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-15-2001, 05:57 PM
  #3
Marlboro
Adept (Level 5)
 
Join Date: Jan 2001
Location: USA - WV
Posts: 43
iTrader: (0)
Marlboro is on a distinguished road
Well its more correct to use DIVS for layout control - tables are overused as a page structure tool. Tables were not designed to become the layout tool they are today.

One advantage that comes to mind is in the ease of layout. I'm sure you've tried to place two tables side-by-side (on the same horizontal plane) and not have one or the other try and 'slip under' the other. 'Bout the only way to accomplish this is to place those 2 tables in another table (single row 2 column) which increases the rendering time. I know its a simple illustration, but if there is no need other than layout structure or control for tables, its a waste of resources imho.

Tables are for tabluation of data - hence the w3c specs recommend this and want developers to use CSS for positioning not tables.

Now dont get me wrong - the are still instances where nothing but a table will do what you need - but used in moderation and intelligently a better design and better coding is the result.

Break on through to the other side.

ps: My dear Dr - the are VERY few things that cant be done identically for IE and NS via CSS, its just a matter of knowing the limitations and the workarounds.

__________________
Mark Wray
XBDHTML Guru
Marlboro is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-15-2001, 06:27 PM
  #4
Ian
Sheriff (Almighty)
 
Ian's Avatar
 
Join Date: Nov 1999
Location: Chch New Zealand God Mode: On
Posts: 3,167
iTrader: (0)
Ian is on a distinguished road
Just had to go and look at it in NS4 to see what happens. LOL, what a mess
__________________
Ian
Ian is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-15-2001, 10:37 PM
  #5
Marlboro
Adept (Level 5)
 
Join Date: Jan 2001
Location: USA - WV
Posts: 43
iTrader: (0)
Marlboro is on a distinguished road
Quote:
Originally posted by Ian
Just had to go and look at it in NS4 to see what happens. LOL, what a mess
Yep! a true mess to say the least.

I 'almost' had it working in NS4.x but I changed something that broke it and I cant recall what I did to make it work LOL.

I think it has something to do with presetting the Div dimension vars to a interger before calc'ing the layout and then resizing based on the rendered content...

but as you can see, the code gets more complex with more the offsets and divs there are. I'm working on simplifing this somewhat, but my knowledge of arrays and JS is somewhat limited in this respect.

but on the bright side i never said it worked in ns4.x



[Edited by Marlboro on 03-16-2001 at 07:33 AM]
__________________
Mark Wray
XBDHTML Guru
Marlboro is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-16-2001, 02:30 PM
  #6
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
Quote:
Just had to go and look at it in NS4 to see what happens. LOL, what a mess


I 'almost' had it working in NS4.x but I changed something that broke it and I cant recall what I did to make it work.

Almost had it working. rrrrrrrrrrrright. Tables are easy to use, backward...forward, and sideways compatible. And you were talking about render time for tables? Uhm......OK. If that were a problem, and its not, I am sure that this forum would have seen its share of...."Why do my web pages render slowly when I use tables for layout?"

Quote:
The w3c specs recommend this (CSS positioning) and want developers to use CSS for positioning not tables.
Tell you what I have learned since I started developing:
Keep it simple.
Don't fix it if it isn't broken.




Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-19-2001, 06:55 AM
  #7
Marlboro
Adept (Level 5)
 
Join Date: Jan 2001
Location: USA - WV
Posts: 43
iTrader: (0)
Marlboro is on a distinguished road
Quote:
Originally posted by Dr. Web
<snip>
Uhm......OK. If that were a problem, and its not, I am sure that this forum would have seen its share of...."Why do my web pages render slowly when I use tables for layout?"
<snip>
Well, if you dont have something to compare it to - then how can one tell if something is slow? I've worked on intranets where every second (or less!) of rendering time is crucial (service level agreements) and did a lot of performance testing for various browsers - and it is becoming more evident nowadays. There are several good articles out there from major reference sites (webreference, sitebuilder etc) that are currently making statements like "stop using lots of tables, they're slowing you down". I've known this for years - but until you actually compare the difference is really apparent. And no, there won't be much difference in render speed if the page only uses a few tables - we're talking you'll need multiple nested undefined tables to see a major increase in performance when converted to CSS.

Fear not though- there are ways to improve the speed of tabled pages and if you look at http://www.webreference.com/authorin...ptimize/4.html you'll see some interesting information (i learned from it).

But on the other hand - our debate is almost moot point, with broadband and 1Ghz machines whats 1/2 sec diff in rendering time?

Your serve - ;-)
__________________
Mark Wray
XBDHTML Guru
Marlboro is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-19-2001, 12:38 PM
  #8
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
Nested tables. Didn't I tell you what I learned.......

Keep it simple.
Don't fix it if it isn't broken.

Nested tables defeat the whole "keep it simple" theme. I guess I could have said that the less moving parts you have, the less your invention will break. OK. Tables. easy to use. Backward, forward, sideways compatible. Chant it with me.

As for tables rendering slow......if you specify your height/ widths.....shouldn't have a problem.

I am sure the guy who puts 12 nested tables (with the help of frontpage) will have a slow downloading site. He probably also used Imageready to slice up 50 pictures for the illustrations too. Nested tables are a problem, not a solution. And until CSS gets figured out so that layout is simple, do it once, works with all browsers..old and new...its not going to catch on.



[Edited by Dr. Web on 03-19-2001 at 01:42 PM]
Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:45 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.