How can I make a div expand like adding content?

I do base a CSS layout in Dreamweaver CS4. The page is a column with the headers, footers and a large area in the Middle for the most part, any statement as div tags in a global div that contains everything.

I set the height of the div global container to 'auto '. The height of the main content div also has the value 'auto '. I thought it would make the main content area develop if necessary, when the text and images are placed in it - that would happen with a layout based on a table. Everything else was going to stay in the right relative position - the divs below the main content div would simply move down as the main content div expands.

Unfortunately, it doesn't seem to work. As the main content div moves down, it pushes everything below the road more or less randomly. The lower part of the layout break like the divs below the main content div are tossed out of position.

Is there some code, I need to keep it all together? Maybe somewhere under the #container #maincontent in the code below?

Thank you for the ideas!

< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

" < html xmlns =" http://www.w3.org/1999/xhtml ">

< head >

< meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"

< title > Untitled Document < /title >

< style type = "text/css" >

<!--

{body

do-family: Arial, Helvetica, without serif.

do-size: 100%;

background-color: #333;

text-align: left;

padding-top: 10px;

padding-right: 0px;

padding-bottom: 10px;

padding-left: 0px;

margin: 0px;

}

#container {}

do-family: Arial, Helvetica, without serif.

do-size: 100%;

background-color: #000;

text-align: left;

padding: 0px;

Width: 960px;

margin-top: 0px;

margin-right: auto;

margin-bottom: 20px;

left margin: auto;

border: 4px solid #FFF;

height: auto;

}

#container #header {}

background-color: #FFF;

height: 268px.

Width: 940px;

padding-top: 2px;

padding-right: 0px;

padding-bottom: 0px;

padding-left: 20px;

}

#container #header2 {}

do-family: Arial, Helvetica, without serif.

make-weight: bold;

background-color: #CCC;

height: 50px;

Width: 920px;

border-top-width: 0px;

border-right-width: 0px;

border-bottom-width: 4px;

border-left-width: 0px;

border-top-style: none;

border-bottom-color: #FFF;

border-right-color: #FFF;

border-bottom-color: #FFF;

border-left-color: #FFF;

padding-top: 10px;

padding-right: 20px;

padding-bottom: 10px;

padding-left: 20px;

border-bottom-style: solid;

}

{#header2 #navigationbox #container

float: left;

height: 50px;

Width: 600px;

}

{#header2 #buttonbox #container

}

#container #maincontent {}

do-family: Arial, Helvetica, without serif.

color: #FFF;

background-color: #000;

text-align: left;

Width: 920px;

do-size: 16px;

make-style: normal;

line-height: normal;

make-weight: normal;

padding: 20px;

Clear: both;

height: auto;

}

#container #footer {}

do-family: Arial, Helvetica, without serif.

background-color: #CCC;

text-align: center;

padding: 10px;

border-top-width: 4px;

border-top-style: solid;

border-bottom-color: #FFF;

border-right-color: #FFF;

border-bottom-color: #FFF;

border-left-color: #FFF;

}

{#topadbox}

background-color: #CCC;

}

#container #footer2 {}

background-color: #CCC;

height: 90px;

Width: 920px;

border-top-width: 4px;

border-top-style: solid;

border-bottom-color: #FFF;

do-family: Verdana, Geneva, without serif.

do-size: 18px;

line-height: 24 PX.

make-weight: bold;

padding-top: 20px;

padding-right: 20px;

padding-bottom: 10px;

padding-left: 20px;

}

#container #header #masthead {}

background-color: #FFF;

text-align: left;

height: 260px;

Width: 550px;

padding-left: 15px;

float: left;

}

#container #header #topadbox {}

float: right;

}

#container #header #topadbox {}

background-color: #FFF;

border: 4px solid #666;

float: right;

height: 250px;

Width: 300px;

Clear: none;

}

#container #header #topadbox {}

padding: 0px;

float: right;

height: 250px;

Width: 300px;

background-color: #FFF;

border-top-width: 5px;

border-right-width: 20px;

border-bottom-width: 5px;

border-left-width: 20px;

border-top-style: solid;

border-right-style: solid;

border-bottom-style: solid;

border-left-style: solid;

border-bottom-color: #CCC;

border-right-color: #CCC;

border-bottom-color: #CCC;

border-left-color: #CCC;

margin-top: 0px;

right margin: 2px;

margin-bottom: 0px;

left margin: 0px;

}

#container #footer #bannerbox {}

margin: auto;

height: 100px;

Width: 728px;

}

{#searchbox}

height: 50px;

Width: 860px;

border-top-width: 4px;

border-top-style: solid;

border-bottom-color: #FFF;

background-color: #CCC;

padding-right: 70px;

padding-left: 30px;

padding-top: 20px;

padding-bottom: 10px;

do-family: Arial, Helvetica, without serif.

do-size: 16px;

}

{#footer2 #creditsbox #container

}

#container #footer2 {}

padding-top: 20px;

padding-right: 20px;

padding-bottom: 20px;

padding-left: 20px;

}

{#header2 #buttonbox #container

float: right;

height: 50px;

Width: 300px;

do-family: Arial, Helvetica, without serif.

do-size: 16px;

line-height: 20px;

make-weight: bold;

Color: #000;

padding: 4px;

}

{#header2 #navigationbox #container

do-family: Arial, Helvetica, without serif.

do-size: 16px;

line-height: 25px;

make-weight: bold;

Color: #000;

}

a: link {}

Color: #F00;

}

a: visited {}

color: #F0F;

}

a: active {}

color: #F90;

make-weight: bold;

make-style: italic;

do-size: 16px;

}

{#footer2 #creditsbox #container

float: left;

height: 90px;

Width: 260px;

do-family: Arial, Helvetica, without serif.

do-size: 12px;

line-height: normal;

make-weight: normal;

}

{#footer2 #creativecommonsbox #container

float: left;

height: 90px;

Width: 520px;

left margin: 20px;

do-size: 12px;

do-family: Arial, Helvetica, without serif.

line-height: 14px;

make-weight: normal;

}

{#footer2 #backtotopbox #container

float: left;

height: 90px;

Width: 100px;

left margin: 20px;

}

{#footer2 #backtotopbox #container

do-family: Arial, Helvetica, without serif.

do-size: 14px;

make-weight: bold;

}

#container #maincontent {}

height: auto;

}

->

< / style >

< / head >

< body >

< div id = "container" > < a name = 'Top' id = 'Top' > < / a >

< div id = "header" >

< div id = "topadbox" > < script type = "text/javascript" > <!--

google_ad_client = "pub-9536785785834220";

/ * Top of page of advertising * /.

google_ad_slot = "9886597060";

google_ad_width = 300;

google_ad_height = 250;

->

< /script >

< script type = "text/javascript".

src = » http://pagead2.googlesyndication.com/pagead/show_ads.js ">

< /script > < / div >

< div id = "generic" > < / div >

< / div >

< div id = "tete2" >

< div id = "navigationbox" >

< center >

" < a href =" http://www.nemesis.to "> Home < /a > | "< a href ="http://www.nemesis.to/live.htm"> Live < /a > | "< a href ="http://www.nemesis.to/records.htm"> CD/Vinyl/Downloads < /a > | "< a href ="http://www.nemesis.to/records.htm"> Photos < /a > | "< a href ="http://www.nemesis.to/int.htm"> Interviews < /a > < br / > ".

" < a href =" http://www.nemesis.to/archive.htm "> archive < /a > | .

" < a href =" http://www.nemesis.to/about.htm "> information and Contacts < /a > | "< a href ="http://www.nemesis.to/links.htm"> < /a > link .

< /Center >

< / div >

< div id = "buttonbox" > < img src = "images_graphics/linkbuttons_4piece.jpg" width = "171" height = "40" hspace = "65" hspace = "4" border = "0" align = "left" well = "#Map" / > "

< name of the map 'Map' id = 'Card' = >

" < area shape ="rect"coords ="1,2,42,41"href =" http://nemesis-to-go.livejournal.com "alt ="LiveJournal"/ > "

" < area shape ="rect"coords ="45,1,86,45"href =" https://Twitter.com/uncle_n "alt ="Twitter"/ > "

" < area shape ="rect"coords ="90,1,128,38"href =" http://www.mixcloud.com/misadventuresinmodernmusic/ " />

" < area shape ="rect"coords ="132,2,171,39"href =" https://www.Facebook.com/misadventures.in.modern.music "alt ="Facebook"/ > "

< / map >

< / div >

< / div >

< div id = "maincontent" > < / div >

< div id = "footer" >

< div id = "bannerbox" >

< p >

< script type = "text/javascript" > <!--

google_ad_client = "pub-9536785785834220";

/ * Bottom of page ad * /.

google_ad_slot = "0254538778";

google_ad_width = 728;

google_ad_height = 90;

->

< /script >

< script type = "text/javascript".

src=" http://pagead2.googlesyndication.com/pagead/show_ads.js ">

< /script >

< /p >

< / div >

< / div >

" < div id ="searchbox"> < form method ="get"action =" http://www.Google.com/search ">

< div style = "border: 0px solid black; padding: 0px; Width: auto; do-size: 16px; ">

< table border = "0" align = "center" cellpadding = "2" >

< b >

< td width = "291" align = "right" valign = "middle" > < input type = "text" name = "q" size = "35".

MaxLength = "255" value = "" / > < table > "

< td width = "102" align = "right" valign = "middle" > < input type = "submit" value = "Google search" / > < table >

< td width = "247" align = "center" valign = "middle" > < input type = "checkbox" name = "sitesearch".

value = "nemesis.to" checked / > "

< span class = "searchtext" > Nemesis to go search for </span > < table >

< /tr >

< /table >

< / div >

< / form > < / div >

< div id = "footer2" >

" < div id ="creditsbox"> Page credits: Photos and construction by < a href =" http://www.nemesis.to/about.htm "> < strong > Michael Johnson < facilities > < /a >." "Nemesis logo by < a href ="http://www. "> < strong > Antony Johnston < facilities > < /a >. «Version red N < strong > < a href = "http://www.rimmell.com" > Mark Rimmell < /a > < / strong >.» < / div >

< div id = "creativecommonsbox" > < img src = "images_graphics/creativecommonslogo.png" width = "88" height = "31" hspace = "4" hspace = "4" align = "left" "/ > words and photos in Nemesis To Go by Michael Johnson are allowed under < a href =" " http://www.creativecommons.org/licences "> < strong > CC < facilities > < /a >." «You can copy and distribute this material or derivations of it, provided that give you a credit to Michael Johnson and a link to < strong > < a href = "http://www.nemesis.to" > Nemesis To Go < /a > < / strong >.» When using materials from other sources, copyright remains with the original owners. All rights to the name "Nemesis To Go" and the "n" logo are preserved. < / div >

< div id = "backtotopbox" > < img src = "images_graphics/arrer_sml_up.gif" alt = "Back To Top" width = "40" height = "40" hspace = "4" hspace = "4" align = "left" / > < a href = "#Top" > top < /a > < / div > "

< / div >

< / div >

< / body >

< / html >

Height of the DIV is determined solely by the amount of content it contains.  It is best to avoid using explicit height values that this limits the amount of content can contain a div tag  If necessary to reveal a background image, use height min instead of the height.

If your #container floated div inside and develops to the content, add the following property to the CSS of your #container.

#container {}

overflow: hidden;  / * for floating containment * /.

}

For more information on why this works, see the link below:

http://colinaarts.com/articles/the-magic-of-overflow-hidden/

Nancy O.

Tags: Dreamweaver

Similar Questions

  • How can I make Android V35 behave like the V24?

    I use FF on Android, I've been holding until the update since 24 V for all newer versions will not auto play mp3 for download without interaction. I use this to play on Google voice email messages. How can I make 35 V behave like a 24 V?

    Thanks Roland, I guess all I can ask is that you can do occur in future releases and maybe make an adjustment if it is a problem for other users to access this feature.

    Thanks Bob

  • How can I make the work/look like a Thunderbird 2 Thunderbird?

    I used Netscape/Mozilla/Thunderbird Mail since the middle / end of the 1990s and was disappointed by the changes after Thunderbird 2, so I went years of Claws Mail, but it is not enough for everything. How can I make Thunderbird current work/look like version 2? In other words, I would turn off the tabs for messages & research, including all traces of what it looks like a label, or space curved GUI / additional shadow separated, so also have only a single search box that will search and display in the current folder box and keep the menus easy to use (with shortcuts that appear when you type) standard for GUI programs While getting rid of the imitation chrome button. I guess that the tabs are okay for things like dealing with Add-ons, but that's all. Maybe there are other things I can think. I know that most/all this can be done in terms of configuration and I think a lot of people would like that there is a full article on it. Virtually everyone, many people that I talk about e-mail also let Thunderbird for all these reasons, of it being too influenced by web browsers, and the IRC channel is virtually dead, so I came here, hoping that this place is not as dead with what happened with the project (announcing that no major update will be When most of the people preferred it maybe before the latest GUI major updates)

    Seriously. You're in the minority, I think.

    No one took the trouble with this stuff since V3 came out. but I wrote a blog postabout this 5 years ago and Mozillazine did a knowledge article database that went further than my blog post. But I wanted to just my menu bar headings message and back small Mozillazine entered CSS change and I think some that can be made obsolete by Australis was two years ago. But if you want to go.

  • Can someone help me how can I make these figures look like (police)?

    http://i49.tinypic.com/35a3wqo.png

    Hi guys

    As you can see the 5 is different (thicker?) that the 1 and 9 and I wonder how I can make that look similar.

    I've been playing with the tool drop eyepiece and a pencil for 2 hours, but I don't see the logic in how to solve this problem.

    I hope someone can explain to me how I can solve this problem.

    Thank you already!

    Hello

    The easiest way, rather than trying to fix the above is to make a new text layer and try some different fonts and maybe experiment with different anti-aliasing for text settings.

  • How can I make sure that all of the content of an accordion is set to 100% width?

    Hello

    I have an accordion, and it is set to 100% width. Unfortunately the text box doesn't let me drag the edges to 100%. That's why when my page is browsed the title in the menu accordion is centered but the text when you open the content pane is not.

    Help, please

    P.S. I tried to make the pixel area 1 larger text, but does knock my width of 100%, which is set up for the accordion.

    (please see Contact Us)

    Just thought I'd put a note here.

    I found the identification number to the Inspector and it targets by adding to the head of the page metadata:

    Page properties

    Metadata

    HTML code for


    I was then able to center the text block :-)

  • BlackBerry smartphones, how can I make my BlackBerry 8800 looks like BlackBerry 8900 or "BOLD"?

    Hi again,

    UH... How can I make my BlackBerry 8800 looks like BlackBerry 8900 or "BOLD"?

    Thank you...

    Hey janvaughnquero11,

    Welcome to the community of BlackBerry Support Forums.

    Thanks for the question.

    The smartphone BlackBerry 8800 a software v4.2 or 4.5 for later.  BlackBerry 5, 6 or 7 device software is not available for this model.

    Let me know if you have any other questions.

    See you soon.

  • I received my annual renewal notice is imminent. However, it does not say how much I pay. How can I make a decision to continue without this knowledge? Feels like a scam?

    I received my annual renewal notice is imminent. However, it does not say how much I pay. How can I make a decision to continue without this knowledge? Feels like a scam?

    As far as I know, prices have not changed, so it's what you paid the first year.

  • How can I make the text in the image, like a signature in a corner?

    How can I make the text in the image, like a signature in a corner?

    Do you need to do it for a lot of pictures?

    Look closely.  It should be under file > processing of multiple files.  Make sure you don't overwrite your original files.

    If a single file, make a copy of the file, create your image in a separate layer and reduce the opacity.  Then flatten image and save it.

  • How can I make a line like this in PS?

    Hello!

    How can I make line such as (rounded edge) in Photoshop?slika.png

    Thank you

    You can use the Brush tool (for example), select the size, hardness, color. Hold the SHIFT key to constrain.

    Might be interesting to do on separate layers, edit and change more easily.

  • How can I make this form?

    How can I make this shape in fireworks:

    shape.png

    I want some pictures in my site has rounded corners. Im making this by adding 4 divs with background images and absolutely positioned, one on each corner of the image. Background images are png with transparent areas. It works as the site background is a solid color, rounded corners do not need to be truly transparent.

    The issue im having is that the pixels on the curve must be semi transparent. ID like to make this shape as a vector, but I don't know how.

    Thank you

    You can do a vector shape like this perforating a circle within a square. Draw a square, draw a circle above it. Select the two objects, and then select Modify > combine paths > Punch. It would be much easier to export your images with corners rounded Fireworks, rather than hide the corners with divs positioned absoultely, however. To do this, draw a white, rounded rectangle on the image. Choose Selection > select all and then modify > mask > Group as mask. Change the color of the canvas to the color of your HTML page.

  • How can I make iOS safari bookmarks 9

    How can I make a bookmark in Safari in iOS 9? My wife Samsung has bookmark icons that appear on the desktop. Can I do this?

    To Add a site to your Favorites in Safari, follow these steps. First of all, make sure you are at the top of the Web page so that you can see the address bar. Look at the bottom and tap and HOLD the third icon (it looks like a page).

    If you hold down the icon a popup appears:

  • How can I make Thunderbird start car with windows startup

    How can I make Thunderbird start car with windows startup

    You can by placing a shortcut in the startup folder of windows, just like any other windows program.

    However if you do, you are likely to encounter problems such as downloading email while still load the antivirus and the network is busy, announcing the arrival of machines on the network (which can be a network a) and any other program of a dozen are loading is heavy risk of timeouts and disconnections of the server as well as error messages that make little sense because they are something that still load.

    The bottom line is so safe that you can, but if there are any questions bring her out of there first.

  • How can I make Firefox the aspect that he used?

    I just bought a new computer laptop with a resolution of 1920 x 1080 and installed Firefox 21. Everything has been compressed to a small part of my screen and change the font size has not helped, nor have layout.css.devPixelsPerPx evolution. I tried updating to Firefox 22 and now, the toolbars are extremely fuzzy, not to mention that everything is always compressed. How can I get this Firefox looks like the way it's supposed to; Crisp, clear and use of my screen?

    Wow, everyone is complaining that their display is huge in Firefox 22.

    Your PPP of Windows setting is set to '100% size text' or 96 DPI? You can check the setting using the control panel display.

    When optimize you for Firefox, does not fully optimize? Apparently there were changes in Firefox 22 associated with window resizing (mentioned in another thread), but I'm not sure what it was.

    Moreover, for your screenshot, maybe you can fill half of the screen with Firefox and the half of the screen with IE, both on the same page for comparison.

    In case you mean that your windows everything changes to more than one low resolution screen stretched when you launch Firefox, on the compatibility of the shortcut tab program and make sure that none of the check boxes is selected it.

  • The address window has been reduced. How can I make it any longer so I can see the address (or most of them at least)?

    I've updated to Firefox for Mac 3.6.23. I have OS 10.4.11. Immediately, I noticed that the address window has been reduced to about half an inch. The search engine is long, like the address used to be window. It's not good for me. I usually use the address window to make changes and move it to a new page. I can't do it now. How can I make long once again the address window? Can I return to 3.6.22? I need this long window.
    Sincerely,
    Gerald E. Strickland
    Bradenton, Florida

    You can place the mouse between the address bar and the search bar, and it will become an icon of resize.

    Press the left mouse button and drag it to the right to make the larger location toolbar.

    You can also reset the related wides by deleting localstore.rdf in the Firefox profiles folder

  • Added 24 "widescreen. How can I make an enlargement page discovered by default, instead of having whenever a page loads zoom? Thank you

    Added 24 "widescreen. How can I make an enlargement page discovered by default, instead of having whenever a page loads zoom? Thank you

    There are some add-ons that can do, like NoSquint and Default FullZoom Level.

Maybe you are looking for