Results 1 to 7 of 7

Thread: CSS Problem : Streaching Divs

  1. #1

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Question CSS Problem : Streaching Divs

    Hi all,

    I m very much new to CSS. So, if my question is silly then please forgive me.

    I come across on problem with my design structure of div.

    I have one main div. The height of this div is not fix.
    Inside it i have 5 divs.

    1st div has fixed height.
    2nd div has 50% of height - So that it can fill the UPPER empty space in the main div
    3rd div has fixed height
    4th div has 50% of height- So that it can fill the BOTTOM empty space in the main div
    5th div has fixed height

    Now the problem arise bec'z the height of the main div is set by server call.
    So how to streach 2nd and 4th div equally which make the 3rd div to be in middle and don't force the 5th div to be disapear when percentage wise height exceed the height of main div.

    I have set the following style in CSS.

    position:relative;
    overflow:hidden; /* - may be buggy - */

    Please forgive me for English.

    Thanks in advance.
    I am using .NET 2010 with Windows 7

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: CSS Problem : Streaching Divs

    Are the 5 divs displaying horizontally or vertically on the page?

  3. #3
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: CSS Problem : Streaching Divs

    You may want to post the related HTML and CSS or link to a page where we can see the problem. Very hard to help with this complex setting without knowing the structure of the HTML etc.

  4. #4

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: CSS Problem : Streaching Divs

    Happy New Year.

    Sorry for last reply. I think u r right. I am hereby attaching some modified code of dw scroller. I need the inner dragbar to be streached automatically.

    In initScrollLayers() function of html page which change the height of dragbar inner 5 Divs dynamically.

    Hope I am clear in explaination.

    Thanks in Advanced.
    Attached Files Attached Files
    I am using .NET 2010 with Windows 7

  5. #5
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: CSS Problem : Streaching Divs

    Hi,

    Please state the names of the divs you want to adjust the height for! I took a look at your code and there were divs all over the place.

    Thanks!

  6. #6
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: CSS Problem : Streaching Divs

    This seems a bit too complex for a simple effect. I think this could be simplified a lot (and even make it work better), but doing that would probably be too time consuming (that is, to us).

    Also, I don't see that there'd be anything wrong with it as it is now, besides it not working at all if you turn off JavaScript. Mouse wheel should work with it.

  7. #7

    Thread Starter
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: CSS Problem : Streaching Divs

    ya i know that the code is complex as it is developed for testing perpose only. Anyway, if Merri find nothing wrong then it's ok. Btw, i can't spend my time for mousewheel.

    Thanks for your support
    I am using .NET 2010 with Windows 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width