Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with div collapse.

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #32776
    dejota
    Member

    Hi I have the following problem, I have 2 divs. one with 75% and another with 25%.

    I want that when the div with 25% collapse, 75% will be enlarged to 100%.

    #75742
    lyleyboy
    Member

    Use Javascript.

    #75697
    dejota
    Member

    do you have any link? or how could I search?

    #75699
    TheDoc
    Member


    Not wide content



    Wide content.


    You have to make the 25% one go first in the HTML, but here it is.

    #75628
    dejota
    Member

    that is a div inside another.

    i need something like this.



    Without width, to take 100% when the div of 25% collapses





    Not wide content



    #75650
    TheDoc
    Member

    You can’t float something that doesn’t have a width because it will just take up 100% of the space. So unless you want to use my example, you’ll have to have some sort of logic involved.

    #75673
    noahgelman
    Participant


    25% div. Collapsible. On the right





    This div will be 75% width and to the left of the 25% content. If the first div collapses this div will be 100%



    #75675
    TheDoc
    Member

    Funny, Noah. I did that exact thing as my first demo, but it didn’t work locally (no my shock) and went with the other example.

    Copy and pasted yours and it works, so clearly I was having a slow morning!

    #75684
    noahgelman
    Participant

    A typo perhaps :)

    #75099
    dejota
    Member

    I try to use divs for that part of the template, but not collapsing the div right when I wanted.

    The only way I could do to collapse and was maintained with tables.

    			


    countModules('right')) : ?>





    countModules('user2')) : ?>









    countModules('user6')) : ?>


    countModules('user7')) : ?>


    countModules('user8')) : ?>


    you can see the website here (is in spanish), if you want to inspect the code with firebug.

    btw, I use joomla.

    http://www.tresarroyosweb.com.ar

    #74927
    bhagavan
    Participant

    hey,
    suppose 25% is not there; than another column occupied by 100% itself…

    #74921
    bhagavan
    Participant

    hey,
    suppose 25% is not there; than another column occupied by 100% itself…




    25% div. Collapsible. On the right





    This div will be 75% width and to the left of the 25% content. If the first div collapses this div will be 100%



    #74831
    dejota
    Member

    Why put the right div before the left div?

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘CSS’ is closed to new topics and replies.