PDA

View Full Version : Dynamic Nested Divs


Chapo
01-29-2009, 04:10 AM
I'm having some probems with Divs inside Divs. I want my Container or Wrapper Div to expand when the inside Div expands. I have a photo Gallery, and depending if you are contracting or expanding the browser, the Div also does it. Here is what i'm trying to do:
http://www.armadiclosets.com/closet-gallery/

Here is my wanna be: http://www.fotorazi.com/
I want my Gallery Div to stay inside the Container, and make the Container contract or expand depending in the browser.

In Dreamweaver CS3 i can't find a way to make the Div expand with my images like a table does, so basically if i can do that, it will help me out. I put my Container width to 90% and hight 90%, i thought it will automatically expand when i added more pics to my gallery but it doesn't.

Corrosive
01-29-2009, 06:16 AM
I'm having some probems with Divs inside Divs. I want my Container or Wrapper Div to expand when the inside Div expands. I have a photo Gallery, and depending if you are contracting or expanding the browser, the Div also does it. Here is what i'm trying to do:
http://www.armadiclosets.com/closet-gallery/

Here is my wanna be: http://www.fotorazi.com/
I want my Gallery Div to stay inside the Container, and make the Container contract or expand depending in the browser.

In Dreamweaver CS3 i can't find a way to make the Div expand with my images like a table does, so basically if i can do that, it will help me out. I put my Container width to 90% and hight 90%, i thought it will automatically expand when i added more pics to my gallery but it doesn't.

It won't expand if you have added a height Chapo because you've specified a dimension. Take the height out and it should work fine.

Chapo
01-29-2009, 09:12 AM
I take the height out and it shrinks to 1px. I thought i have my Container at 90% and the inside Div eich is the Gallery, that it will be fine. But the height didn't work out.

Chapo
01-29-2009, 09:17 AM
The main idea is that the Cointainer should be separeted 10% of the browser edges and the inside gallery also separated of the edges of the container some 10%. Just like http://www.armadiclosets.com/closet-gallery/

Corrosive
01-29-2009, 09:25 AM
The main idea is that the Cointainer should be separeted 10% of the browser edges and the inside gallery also separated of the edges of the container some 10%. Just like http://www.armadiclosets.com/closet-gallery/

You ever gonna buy a closet off these people? You've given them enough links :wink: :lol:

If you don't want the images to touch the sides then use some padding. That's what it is for. Don't set a height on the div and then just add your images and it should be fine.

Chapo
01-29-2009, 11:44 AM
You know, some day i will buy them some closets.... you never know. Life is like a box of chocolate, you never know what you are gonna get... jeje

Thanx Mate, i'll keep trying as hard as i can... this has to work out.

Chapo
01-29-2009, 11:47 AM
Hey... one more thing.... Does the Div has to be relative or absolute ?

Chapo
01-29-2009, 11:49 AM
If i dond't add a height for the DIV, it will colapse to 1 px, how to add images to it, its impossible ? sorry i'm so airhead on thurdsays.

Corrosive
01-29-2009, 11:50 AM
Hey... one more thing.... Does the Div has to be relative or absolute ?

Better relative if you can.

Corrosive
01-29-2009, 11:53 AM
If i dond't add a height for the DIV, it will colapse to 1 px, how to add images to it, its impossible ? sorry i'm so airhead on thurdsays.

Yes it will but you can still add images and it will 'grow' as you add them. I'd suggest in an unordered list for the images with padding in the containing div to make sure it all lines up correctly. Mate, it really is time you got away from design view as it is limiting your vision for how thing work.

Chapo
01-29-2009, 12:15 PM
Thanx Corrosive... it just worked out, you deserve some kind of Grammy or Oscar for Dreamweaver.... I know i should join the Dark side of coding, but its so no nice here in Design view, you see blue skies, beaches and girls around here. I just started a few days to learn more about coding, at least i made my first LightBox effect last night... thats something. jeje... (hey Mate, is it Kuros, Curos, Cudos .... i forgot )

Chapo
01-29-2009, 12:40 PM
How can i save my Dreamweaver Site to my External Hard Drive to keep working in another computer ? In Flash i just save the .fla and i keep woring with that in another computer... how i do that in DW ? i have take my computer to service but i need to keep working my CLOSET site.

sageman
01-29-2009, 12:42 PM
trying setting the height to auto in your css. i have gotten it that work a few times. i always forget how i did it

Corrosive
01-29-2009, 12:49 PM
How can i save my Dreamweaver Site to my External Hard Drive to keep working in another computer ? In Flash i just save the .fla and i keep woring with that in another computer... how i do that in DW ? i have take my computer to service but i need to keep working my CLOSET site.

Manage sites > export. This will export a file with the site definitions on it. Then you'll need to copy all the files to your external drive as well and then re set it all up by importing the definitions to your other PC, along with the files.

It is with great pleasure that I accept this Oscar for Dreamweaver :wink: Maybe a Nobel Peace Prize? Anyhoo, Kudos mate.

Corrosive
01-29-2009, 12:55 PM
trying setting the height to auto in your css.

You shouldn't really need to...but it can't hurt.

Corrosive
01-29-2009, 12:57 PM
Thanx Corrosive... it just worked out, you deserve some kind of Grammy or Oscar for Dreamweaver.... I know i should join the Dark side of coding, but its so no nice here in Design view, you see blue skies, beaches and girls around here. I just started a few days to learn more about coding, at least i made my first LightBox effect last night... thats something. jeje... (hey Mate, is it Kuros, Curos, Cudos .... i forgot )

The thing about design view, in my experience, is that you end up with really messy code. Stray bits of code always seem to be left behind when you change anything. Might be time to turn your back on the bikini girls and blue skies and join us on the dark side.

Chapo
01-29-2009, 01:50 PM
How can i save my Dreamweaver Site to my External Hard Drive to keep working in another computer ? In Flash i just save the .fla and i keep woring with that in another computer... how i do that in DW ? i have take my computer to service but i need to keep working my CLOSET site.

(I wil join the Dark side, coming soon..!!! )

domedia
01-29-2009, 02:26 PM
See post #14 above