Hidden Elements Cause Page Overflow

  • HotSpot
  • Born
  • Born
  • No Avatar
  • Joined: Apr 26, 2007
  • Posts: 2
  • Status: Offline

Post April 26th, 2007, 4:59 am

Greetings everyone! This is my first post :)

I have a page where I have placed 'hover-based' context menus by means of conditionally invisible <span> tags at the end of my page.

The problem is that the content inside some of the context menus exceed the length of the content that is visible on the page. This leaves a blank area at the end of my page (thats where i have placed all those invisible span tags for my context menu). I want to get rid of this blank area :?

Any info is highly appreciated. Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 26th, 2007, 4:59 am

  • lostboy
  • Expert
  • Expert
  • No Avatar
  • Joined: Jun 03, 2005
  • Posts: 511
  • Loc: Just north of Toronto
  • Status: Offline

Post April 26th, 2007, 5:38 pm

place them in a div and position the div
Lostboy

Cat, the other other white meat
  • Kootenay
  • Born
  • Born
  • No Avatar
  • Joined: Nov 21, 2007
  • Posts: 1
  • Status: Offline

Post November 21st, 2007, 12:24 pm

Elements within the hidden div can also cause a page to run long with their overflow, even if the div is positioned.

If you code it like <div style="height:0;overflow:hidden;visibility;hidden;"> that should solve the problem.

Cheers, Kootenay
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 21st, 2007, 12:27 pm

Use display instead of visibility ?
Strong with this one, the sudo is.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Joined: Mar 12, 2007
  • Posts: 6228
  • Loc: South-Africa
  • Status: Offline

Post November 21st, 2007, 12:32 pm

wouldn't it also then be "display:none" instead of "display:hidden" ... ?
Let's leave all our *plum* where it is and go live in the jungle ...
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Joined: Oct 02, 2007
  • Posts: 575
  • Loc: Phoenix, AZ
  • Status: Offline

Post November 21st, 2007, 2:48 pm

righteous_trespasser wrote:
wouldn't it also then be "display:none" instead of "display:hidden" ... ?

Instead of using either of these, it might also work to just set the size of the div to 0px by 0px and then back to normal size in the hover state.
phoenix web design
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post November 21st, 2007, 2:53 pm

jameson5555 wrote:
righteous_trespasser wrote:
wouldn't it also then be "display:none" instead of "display:hidden" ... ?

Instead of using either of these, it might also work to just set the size of the div to 0px by 0px and then back to normal size in the hover state.


If it's 0px by 0px there is nothing to hover over to bring it to normal state. (Just the same as "display:none;")
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 21st, 2007, 2:55 pm

Good point bogey.
I was under the impression a different element was the one triggering the event.
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post November 21st, 2007, 2:58 pm

Is this what you want?

Code: [ Select ]
overflow: hidden;
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Joined: Oct 02, 2007
  • Posts: 575
  • Loc: Phoenix, AZ
  • Status: Offline

Post November 21st, 2007, 3:03 pm

Bogey wrote:
If it's 0px by 0px there is nothing to hover over to bring it to normal state. (Just the same as "display:none;")

Hmm.. good point... I guess it'd be easier to say if we had some code to look at.
phoenix web design
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post November 21st, 2007, 3:12 pm

I think he means something like this example... "the content inside some of the context menus exceed the length of the content that is visible" to quote him word for word.


Code: [ Select ]
<div style="width: 100px;">
ksajfhksdfhjfdsjksajfhksdfhjfdsjksajfhksdsdlkihfskhfkjsfhglfdsahjghfdlgsdjfhgjjjf
</div>
  1. <div style="width: 100px;">
  2. ksajfhksdfhjfdsjksajfhksdfhjfdsjksajfhksdsdlkihfskhfkjsfhglfdsahjghfdlgsdjfhgjjjf
  3. </div>
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 21st, 2007, 3:14 pm

Adding a "float" would do the trick to I imagine.
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post November 21st, 2007, 3:19 pm

jameson5555 wrote:
I guess it'd be easier to say if we had some code to look at.


Some code may help as well though...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 111 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.