Web Design and Development Forums

div resizing problem

This is a discussion on "div resizing problem" within the JavaScript Forum section. This forum, and the thread "div resizing problem are both part of the Program Your Website category.

Old Apr 10th, 2008, 09:51   #1 (permalink)
Junior Member
 
Join Date: Oct 2007
Location: UK
Posts: 38
div resizing problem

I am having a problem where I resize a div relative to the page size, when you resize the window the div should resize to fit the page. It works okay when you make the page longer, but if you make the page shorter it doesn't work.

Please have a look at this example to see what I mean: http://www.brighton360.com/index.php.html
(Problem occurs in Opera & FF). Click on one of the images, (click OK on alert) resize the window so that it is really thin (click OK on alert). Now resize the window back to fullscreen. I added some debugging code, an alert pops up and you can see that the overlay div has resized to 1px - but look at the scrollbar - its the same as when the window was small. Click okay on the alert and the div resizes to fit the page - which is the same height as it was when the window was small. So you're left with a massive blank section at the bottom of the page.

Please could anyone help me with this, I don't understand why the page is staying so long when it doesn't have any content to make it that long (at the point the div height is set to 1px).

This problem can be fixed by setting the div to display = none before recalculating page size, but I don't really like this fix. Why setting display = none doesn't have the same effect as changing the size to 1px high I don't know.
djeyewater is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 10th, 2008, 18:56   #2 (permalink)
Junior Member
 
Join Date: Oct 2007
Location: UK
Posts: 38
Re: div resizing problem

Solved - Setting the height and width of the div to the page size rather than setting minHeight and minWidth seems to fix it. Still, would be interested if anyone knows why it didn't work.
djeyewater is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
resizing images dvdriper JavaScript Forum 1 Feb 29th, 2008 16:44
Firefox image resizing problem with CSS paishin CSS Forum 2 Jun 15th, 2007 13:29
resizing.... jjgamepro17 HTML Forum 3 Apr 18th, 2007 20:22
Resizing a movie in a div Pizz360 CSS Forum 3 Oct 9th, 2006 17:15
Resizing (in pixels) danburzo Graphics Forum 2 Jun 19th, 2005 11:06



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 11:33.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59