Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Help Div Layers And Css
galexcd
post Jun 21 2007, 11:40 PM
Post #1


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 975
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



Ok I wasn't sure weather or not to put this in javascript, or CSS, but since it deals more with css, and I'm only using javascript to modify the css, I posted here.

I've got a div layer who's initial CSS attributes are, overflow: hidden; height: 0;

I'm making a javascript function to reveal the contents of this div layer, so I set overflow to visible. Which should change the height of the div layer to match the content of the div layer. Unfortunately, it displays the contents, but what is weird is the height is still 0 blink.gif I seriously have no idea how a div layer with a height of 0 can display anything, but it does... I can set the height via javascript when setting the the overflow, but the problem with that is I have no idea what height to set it to. This div layer will be displaying different amounts of content at different times. I tried every possible css style attribute I know such as pixelHeight, clipBottom, I event tried style.bottom-style.top, but that still gave me 0. Is there anyway of fixing this?

So you don't waist your time suggesting fixes that wont work:
  • Setting the visibility to hidden instead of the overflow and the height will not work because the div layer still is the same size, causing a big empty space
  • Having the content visible at first, then have javascript record the height in a variable, then hide it wont work because I need people without javascript to not see this div layer
Go to the top of the page
 
+Quote Post
truefusion
post Jun 21 2007, 11:53 PM
Post #2


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,868
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528
T17 GFX Crew



A division is nothing like a table as in it does not constrain the data, it allows it to flow beyond the border—this is one reason why i choose tables over divisions on certain designs. Suggestion: Don't change the visibilty, for that'll leave that big empty space you are talking about, but instead change the display.
Go to the top of the page
 
+Quote Post
galexcd
post Jun 22 2007, 12:04 AM
Post #3


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 975
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



Ah!! truefusion you're a genius. Thanks so much!! Resolved my problem!
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Jun 22 2007, 02:40 AM
Post #4


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,438
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



Truefusion is my boy!! xd.gif This is a good topic and certainly a good tip for all of us. Thank you for the question and the answer.

I'll leave this on for others, just in case.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Dreamweaver Cs3: How To Link Content To Layers/apdivs(5)
  2. Onclick In Layers(2)
  3. Detailed Tech Sig(7)
  4. 3 Layers And 2 Layers Switches(3)
  5. Frontpage Layers Problem(4)
  6. Layers With Text Appear(1)
  7. Photoshop Tutorial(0)
  8. Blending Layers Using A Gradient?(1)


 



- Lo-Fi Version Time is now: 26th July 2008 - 03:07 PM