CSS - Expanding To Accommodate Inner Float
Hello all
On the following page: http://www.clearsight.info/demo/ is there any way to get DIV.frame or DIV.main to expand to accommodate the image? Thanks Tom Similar Tutorialssubject isn't too good anyhow.. i have 4 cells __ __ |1 | |2 | --- --- __ __ |3| |4 | --- --- 2 and 4 are said to float right, such that 1 and 3 define the height of the page.. but.. when the contents of 2 go LONGER than the contents of 1, number 4 doesn't float right properly.. instead this happens __ __ |1 | |2 | --- | | --- | | |4| --- --- __ |3| --- do you see that? 4 tries to float right, but since it's called underneath 1, and 2 is extended, floating right relative to the page doesn't make it ACTUALLY float right any thoughts that will render this properly? (namely that cells 1 and 3 will inherit the height of 2 and 4 somehow?) Hello, I started off trying to find a content box that expands depending on screen res because the last one I made would break in the middle if the users screen res was over 1600px wide. This box worked great with the screen res but now I'm trying to put content in it and my content is not expanding the box down. Instead of pushing the box lower and forcing a scroll bar. The content keeps going down past the bottom of the box and makes a scroll bar. Any idea how I can make the box expand with my content? here is a link to my test page. http://www.gamerunion.com/test.html My css code. Code: div#case { position:absolute; z-index:1; top:200px; left:50px; bottom:50px; right:50px; background:url(/assets/images/tile.png) repeat; } div#tlcorner span, div#trcorner span, div#blcorner span, div#brcorner span, div#lftile span, div#rttile span, div#tptile span, div#btmtile span { width:0; height:0; overflow:hidden; display:block; } div#tlcorner { position:absolute; z-index:10; top:0; left:0; background:url(/assets/images/corners.png) -369px 0 no-repeat; width:123px; height:123px; } div#trcorner { position:absolute; z-index:10; top:0; right:0; background:url(/assets/images/corners.png) -246px 0 no-repeat; width:123px; height:123px; } div#blcorner { position:absolute; z-index:10; bottom:0; left:0; background:url(/assets/images/corners.png) 0 0 no-repeat; width:123px; height:123px; } div#brcorner { position:absolute; z-index:10; bottom:0; right:0; background:url(/assets/images/corners.png) -123px 0 no-repeat; width:123px; height:123px; } div#lftile { position:absolute; z-index:5; top:0; left:0; bottom:0; background:url(/assets/images/lr.png) -20px 0 repeat-y; width:20px; } div#rttile { position:absolute; z-index:5; top:0; right:0; bottom:0; background:url(/assets/images/lr.png) 0 0 repeat-y; width:20px; } div#tptile { position:absolute; z-index:5; top:0; right:0; left:0; background:url(/assets/images/tb.png) 0 0 repeat-x; height:123px; } div#btmtile { position:absolute; z-index:5; bottom:0; right:0; left:0; background:url(/assets/images/tb.png) 0 -123px repeat-x; height:123px; } div#case div.content { position:absolute; z-index:10; width:100%; min-height:400px; overflow:hidden; } div#case div.content h1 { font-family: "Times New Roman", serif, sans-serif, Arial; font-size:16px; color:#000000; margin:5px 0; padding:100px 0 0 100px; text-align:left; text-transform:capitalize; } div#case div.content p { font-family: "Times New Roman", serif, sans-serif, Arial; font-size:14px; color:#000000; text-align:justify; padding:0 100px; } HTML Code: <body> <div id="header"> <h1 class="small">GamerUnion</h1> <h2 class="small">For Gaming Addicts by Gaming Addicts.</h2> </div> <div id="case"> <div id="tlcorner"><span>top left corner</span></div> <div id="trcorner"><span>top right corner</span></div> <div id="blcorner"><span>bottom left corner</span></div> <div id="brcorner"><span>bottom right corner</span></div> <div id="tptile"><span>top side tile</span></div> <div id="lftile"><span>left side tile</span></div> <div id="rttile"><span>right side tile</span></div> <div id="btmtile"><span>bottom side tile</span></div> <div class="content"> <div id="nav"> <ul> <li><a href="/" class="current">Home</a></li> <li><a href="/about.html">About</a></li> <li><a href="/forum/">Forum</a></li> <li><a href="/resources.html">Resources</a></li> <li><a href="/contact.html">Contact</a></li> </ul> </div> <h1>Gamerunion</h1> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> <p>Text text text text</p> </div> </div> </body> Hi There - Am converting another design from tables, working with a CMS (Drupal) and an existing CSS / table combination that I didn't write and have no choice about. Think of the header as having three sections. The top section has logo on the left, search box on the right. Rounded corners. I'm cool with that section. Then there's a space. Created a div for the space. Love the space. Problems with the space in IE. Will go into it later. Then there's the next section. Rounded corners. Contains the entire page. On the left is a pulldown menu, about 1 cm from the top. On the right is a tabbed menu. This menu has flexible height. It needs to be right up against the bottom with the menu below it. Call this section the tabbed menu section. Third section. Immediately below that is a bar menu like the one Apple's got. Looks like a metal bar with divisions. Call this primary links. ---------- First, the space between. In IE, when you roll over the bar menu, the space disappears. Won't come back. Initially, in the second section, floated the pulldown menu left and the tabbed menu right. That worked fine, except that the tabbed menu had a width of 100% and pushed up the pulldown menu so the section was too wide. When I put it to 65%, all hell broke loose with the bar menu in the third section below it and bits of it snuck up into the second section. If I left it alone, and left the tabbed menu at 100%, when I checked over its container with firebug, it said that it was being affected by the primary links. I figured that out also because the background for that container was a really weird color that I finally found in the background of the navigation id and changed to white. Primary was overlapping it so I couldn't see it with firebug. So after fiddling with several clearing methods, I gave up and decided to try a table. Table worked fine, and the second section looks good except that there's a one pixel space between the tabbed menu and the bar menu. --------- It is my greatest wish right now to be able to float the pulldown to the left, the tabbed menu to the right and have the primary links stay below. I wish I could get the space to work and I wish for a clear understanding of it all so I can then figure out where to put the corners. Anyone who can enlighten me on this would have my undying gratitude. I've been working on this all day and the deadline's tomorrow. Code: <div id="top part" logo and searchbox </div> <div> that pesky space that disappears in IE when roll over primary links </div> <div id=navcontainer> dropdown and tabbed menu </div> <div id="navigation" class="menu> <!-- couldn't find the menu class in the css --> <div id="primary" class="clear-block"> contains barmenu - very fussy </div> </div> Here's the relevant CSS: Code: div#navigation { background: #fff url(../images/blue/menu-bg.png) 100% 100% repeat-x; } #primary { line-height: 30px; } #primary ul { padding:0; margin:0; list-style:none; } #primary li { display:inline; } #primary a { font-weight:bold; display:block; float:left; padding:0px 14px 0px 14px; margin: 0px 1px 0px 0px; font-size: 95%; } #primary a { background-position:0% 0px; } #primary a:hover { text-decoration: none; background-position:0% -42px; } #primary a.active { background-position: 0% -84px; } #primary a { background: url(../images/blue/menu-div.png) 100% 0 repeat-y; color:#666666; font-size: 120%; font-family:Arial,Helvetica,sans-serif; } #primary a:hover { color: 666666; background: #B8B8B8; } #primary a.active { color: 666666; background: #B8B8B8; } This is my first try at css and i have been at it about a week on and off. I have tried to use examples from here and the o'reilly CSS cookbook. I want to create a two column row of pictures with a caption. I selected DIV as the tool (my css is below). The container DIV looks great. I want the div.float, however, to start a second row when a third picture is added and to continue thereafter with successive two column rows. Unfortunately, each of my rows contain only one picture. here is my css style sheet. A demonstration of the problem can be seen at: http://www.yourline-online.com/demo05/?How_to_create_pages Code: div.float { float: left; BORDER-RIGHT: #808080 2px solid; PADDING-RIGHT: 2px; BORDER-TOP: #808080 2px solid; PADDING-LEFT: 2px; FONT-WEIGHT: lighter; FONT-SIZE: medium; PADDING-BOTTOM: 20px; MARGIN: 16px 2%; BORDER-LEFT: #808080 2px solid; COLOR: #000000; PADDING-TOP: 2px; BORDER-BOTTOM: #808080 2px solid; HEIGHT: 200px; WIDTH: 150px; BACKGROUND-COLOR: #ffffff; TEXT-DECORATION: none } div.float p { text-align: center; } div.container { border: 2px dashed #333; background-color: #ffe; } div.spacer { clear: both; } MY HTML is like this: Code: H1>How to create pages</H1> <P>The headings are used for splitting up the content file. An H1, H2 or H3 heading will dynamically split the document into new pages in the table of contents. An H4-heading is used as a heading within a page. See the following pages...<BR></P> <P></P> <DIV class=container> <DIV class=spacer></DIV> <DIV class=float><IMG height=100 alt="image 1" src="image1.gif" width=100> <P>caption 1</P></DIV> <DIV class=spacer></DIV> <DIV class=float><IMG height=100 alt="image 2" src="image2.gif" width=100> <P>caption 2</P></DIV> <DIV class=spacer> <DIV class=float><IMG height=100 alt="image 3" src="http://www.yourline-online.com/demo05/image3.gif" width=100> <P>caption 3</P></DIV> <DIV class=spacer></DIV></DIV></DIV> Hi all, I have a bit of an odd situation (prob not odd if you seen it before but I have no clue why its doing it!).... I have my webpage: http://www.houseofhawkins.com/index.html which works great in IE. the part in question is the menu tabs at the top. Within IE they keep the width I have given them.. In firefox they only go to the width of the text. They are links with the following CSS attached: div#Header #MenuSection a.MenuTab { PHP Code: filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#A8DBA8', startColorstr='#A4B7A4', gradientType='0'); font-weight: bold; text-align: center; font-size: 1.3em; background-color: #BCD6BC; border-style: solid; border-width: 1px; border-color: #A5BEA5 #BCD6BC #BCD6BC #A5BEA5; margin: 0 5px 0 2px; height: 1.5em; width: 140px; padding: 5px 1px 1px 1px; } div#Header #MenuSection { float:left; margin-top: 30px; } here is the HTML code for that part of the page. PHP Code: <div ID="MenuSection"> <a Class="SelectedMenuTab" Title="You are currently viewing the Home page">Home</a> <a Class="MenuTab" href="" title="Curriculum Vitae for Jonathan Hawkins, Author of House of Hawkins">CV</a> <a Class="MenuTab" href="http://houseofhawkins.com/projects/index.html" title="Portfolio of Work created by Jon Hawkins">Portfolio</a> <a Class="MenuTab" href="" title="Online Photo Gallery of Jon, friends and family">Photo Gallery</a> <a Class="MenuTab" href="http://houseofhawkins.com/games.html" title="Games created by House of Hawkins">Games</a> </div> <div style="clear:left"> </div> I just dont get why firefox wont be nice and give me the width I ask for... the oddest bit is if I put float:left into the menutab part they do work! I wish to understand why its like this... I have attached the CSS and the file if that helps anyone. Thanks for the help and advice. I think that this is something really basic but I just haven't been able to put my finger on the problem. Can someone please point me in the right direction? In IE 6 the cell background (as defined in CSS) or the table cell size is not correct, but it looks fine in FF. The test page is: http://www.kdays.com/box/kerrin.htm going bonkers, I have tried everything to find out why on earth the background goes all the way to the right when this page is viewed in IE.. Black Background Not Stoping!! Hi, I am trying to make a website for a friend that scales to fit most monitors. The website is very image heavy and I have a navigation bar on the left side that lines up with the background on the right. I haven't made a webpage for awhile so I don't know a lot about CSS. This is what I have so far. It almost works, but the background on the right will not expand to fit the full div, only goes up to the content that I put inside the Div. The background also doesn't appear to shrink when I scale the window size. HTML CODE: Code: <head> <link rel="stylesheet" href="style.css" type="text/css"/> <title>Test Page</title> </head> <body> <div id="sample-container" align="center"> <div id="header"> <img src="images/header.jpg" width="1647" height="147" / id="headerbar"></div> <div id="nav"> <img src="images/navbar.jpg" width="413" height="776" / id="navbar"></div> <div id="content"> <img src="../../../Pictures/Misc/101_0138.JPG" width="527" height="428" /> </div> <div id="footer"></div> </div> </body> </html> CSS CODE: Code: #header { height: auto; background-color: #666; } #nav { float: left; width: 25%; height: auto; background-color: #999; margin-bottom: 10px; } #content { float: left; width: 75%; height: auto; background: url(images/mountain.jpg); background-repeat: no-repeat; margin-bottom: 10px; } #footer { clear: both; height: 50px; background-color: #666; margin-bottom: 10px; } #headerbar { height:auto; width:100%; } #navbar { height:auto; width:100%; } If anyone knows a way to expand the background to fill the div and scale down when the div scales is size, that would be great. I was also thinking that maybe I could put the the navigation bar and the background image on the page and not as an background. Put those both in a div and have a floating div on the right aligned over the top of the background that contains the page content. If anyone could give any help with a solution it would be appreciated. Thanks. hi, Im making a site, and i decided to use CSS instead of tables. I have used basic CSS before, but it gets abit harder when i start making boxes etc. Here is my code so far - layout.css - (one that gets included on each page) Code: @import "style.css"; body { margin:10px 10px 0px 10px; padding:0px; } #leftcontent { position: absolute; left:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #centercontent { background:#fff; margin-left: 199px; margin-right:199px; border:1px solid #000; voice-family: "\"}\""; voice-family: inherit; margin-left: 201px; margin-right:201px; } #shoutbox { position: absolute; right:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #rightcontent { position: absolute; right:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #banner, #footer { background:#fff; height:40px; border-top:1px solid #000; border-left:1px solid #000; border-right:1px solid #000; voice-family: "\"}\""; voice-family: inherit; height:39px; } #footer { background:#fff; height:40px; border-bottom:1px solid #000; border-left:1px solid #000; border-right:1px solid #000; voice-family: "\"}\""; voice-family: inherit; height:39px; } #banner h1 { font-size:16px; padding:10px 10px 0px 10px; margin:0px; } #shoutbox, #rightcontent p { font-size:10px } style.css - text formatting etc. Code: body { font: 12px/1.2 Tahoma; background:#ddd; padding:0px; margin:0px; } a { text-decoration:none; font-weight:bold; color:#c00; } pre { font-size:11px; color:blue; } ol { margin-right:40px; } li { margin-bottom:10px; } p,h1,pre { margin:0px 10px 10px 10px; } h1 { font-size:14px; padding-top:10px; } it produces a good layout, with a header, 3 coloums and a footer. whoever, the boxes expand at different rates and the footer doesnt move down. the header also doesnt expand. i know how i can fix this, but i dont know how to fix it without making it so that its locked at a resolution. i would like the site to exapand as the window is made larger. here is an image of what i get - and this is what i am aiming to acheive - as you can see, i want all the boxes to be the same length, which is defined by the size of the largest box. also, i want to create 2 or more boxes on the left, only the bottom of which gets made longer. on the first image you cannot see the extra box because it is covered by the other one :-/ i would be greatful for any help you guys can provide me thanks, dynamyt Hi there I have a container DIV that nests 4 DIVs one on top of the next (logo, navigation, content and footer, all the same widths). If there is a single paragraph (or small amount) of text in the content DIV of the page, the page looks fine. However, if there is a large amount of text in the content DIV of the page, the width gets pushed out slightly. IE5 is fine. Firefox and Opera are the problem. Note: I have left the height of the content DIV blank as it will be of varied size. When I set a height of say, 500px, the page looks fine (but because a background colour is needed for the DIV, it doesn't appear as I intended it to). Any ideas to why this is happening? Thanks in advance :-) -Solange. Hello. Trying to construct a page with vertical expansion on both of two nested DIVs. Left column is primarily text which varies in length. Right column is a navigation/contact panel that is mostly fixed height, but want ability to drop in objects and expand vertically on some pages. I have tried to background image in container DIV, but I am still getting the content breaking out of the bottom of the DIV. Any other approaches? Min-height (could not get that to work either). Ideally I would like for these to have the same height. Not shading, so it doesn't need to be exact. Here's a sample of code (w/o all the junk). ive been at this for a while now. i have a navleft.gif, navbody.gif, and navright.gif. what i want to do is make an expandable nav bar with the body repeating on the x axis. every attempt ive made doesnt work. im still fairly new to css. should i have a <div id="nav"> and within this div put a another div with id=navleft and another with navright? no idea how to go about this. any help would be appreciated. I have started creating a new DIV layout for my website but can't seem to get it to function correctly. I finally got the DIVs to expand with whatever content is in them, but now they will only span to the height of the window and hide the rest of the content instead of expanding further and just making the IE window scroll. Maybe one of you guys can help me out? Here is the test page: well apparently I can't post the url, so I guess I'll just "say" it. juicyart dot net / test.html You can see the problem he BrianRoyer.com The google adsense ad is expanding past the container. Here is my style.css for troubleshooting: Code: html, body { background: #a0a0a0 url(images/main_bg.gif) center top repeat-x; height: 100%; margin-top: 0px; margin-bottom: 0px; height: 100%; } a:link { color: #FFFFFF; text-decoration: underline; } a:visited { color: #FFFFFF; text-decoration: underline; } a:hover { color: #FFFFFF; text-decoration: none; } a:active { color: #FFFFFF; text-decoration: none; } #container { width: 703px; margin: 0 auto; background: #068add url('images/content_bg.gif'); border-left: 5px solid #cdcdcd; border-right: 5px solid #cdcdcd; border-bottom: 5px solid #cdcdcd; } #content em.u { text-decoration: underline; font-style: normal; } #top { padding: 0; border: 0; } #top img { border: 0; } #top h1 { padding: 0; margin: 0; } #leftnav { float: left; width: 160px; margin: 0; padding: .25em 0 0 .75em; } #rightnav { float: right; width: 125px; margin: 0; text-align: center; padding: 1em 1em 0 0; } #rightnav img { margin: 0; border: 0; text-align: center; padding: 1em 0 0 0; } #content { margin-left: 200px; margin-right: 200px; padding: 1em 0 0 0; width: 290px; } #content img.left { margin: 5px; border: 1px solid #000000; float: left; } #content img.right { margin: 5px; border: 1px solid #000000; float: right; } #leftnav img { margin: 0; border: 0; } #google-search img { border: 0; padding: 1em; } #footer { width: 699px; padding-top: 1em; margin: 0 auto; background: #068add url(images/footer_bg.gif) center bottom repeat-x; } #leftnav p, #content p { margin: 0 0 1em 0; text-align: justify; color: #FFFFFF; font-family: Verdana; font-size: 12px; line-height: 130%; } #rightnav p { margin: 0; padding: 0; color: #FFFFFF; font-family: Verdana; font-size: 10px; } #leftnav hr, #content hr, #rightnav hr { color: #FFFFFF; height: 1px; } #content h2 { color: #FFFFFF; font-family: Verdana; font-size: 12px; } #content h2.center { text-align: center; color: #FFFFFF; font-family: Verdana; font-size: 12px; } #leftnav h2, #rightnav h2 { text-align: center; margin: 0; color: #FFFFFF; font-family: Verdana; font-size: 12px; } #content h6, #leftnav h6, #rightnav h6 { text-align: center; margin: 0; padding: 1em; color: #FFFFFF; font-family: Verdana; font-size: 8px; } #navcontainer ul { list-style-type: none; text-align: left; padding: 0 0 0 1.25em; margin: 0; } #navcontainer ul li a { background: transparent url(images/list_off.gif) left center no-repeat; padding-left: 15px; text-align: left; font: normal 10px Verdana; text-decoration: none; color: #FFF; } #navcontainer ul li a:hover { background: transparent url(images/list_on.gif) left center no-repeat; color: black; } #navcontainer ul li a#current { background: transparent url(images/list_active.gif) left center no-repeat; color: #666; } And here is snippet of code where the adsense ad is located: Code: <div id="container"> <div id="top"> <? include("ssi/header.inc"); ?> </div> <div id="leftnav"> <? include("ssi/leftnav.inc"); ?> </div> <div id="rightnav"> <? include("ssi/rightnav.inc"); ?> </div> <div id="content"> ad = rightnav.inc Hey guys, I've got a two column layout, and I want both columns to be the same height inside the wrapper. Ussually when I do this sort of thing I have a repeating background image or something so it makes it appear they are both the same height, except this template is using rounded corners, so a repeating background won't work. Code: #wrapper{ width:962px; margin: 25px auto; } #mainContent{ width:735px; background-color: #F4FEFE; padding:0px; border:0px; float:left; } #rightColumn{ background-color: #F4FEFE; width:207px; height:100%; min-height:100%; float:left; margin-left:20px; } Click here to see what I'm talking about... I want that right column to match the height of the main content div. Would this only be possible using JavaScript or is there a CSS solution? Hi all, I have a site where I have several divs that stack on top of each other for layout purposes and they fill the entire width of the screen. In the div that contains the content, I'm finding a rare case where a table appears that's so wide, it is off the edge of the content element. I wanted to do overflow:auto so that it wouldn't mess up the layout but the customer wants the layout to expand with the content. Since all these divs sit on top of each, they aren't really interacting with the div that has the content in it. Is the only way to make those expand to use JavaScript to detect the width and adjust on the fly or is there a better way to do it? I'll be happy to supply some code if you all need me to but its a lot so I'll hold off on that for now. Hi guys, I'm trying to sort out the top level menu. It's supposed to allow a hover effect, where a sub menu then appears. This secondary nav then spans across in an inline fashion. The link to the site is: http://yoursitetest.co.uk/index2.php However it seems to have some kind of 'width' set on the parent which the sub menu cannot expand past. This is some of the code i think is relevant: (Rest of nav cut due to repeating nature) Code: <ul id="navigation"> <li class="main" style="position:absolute; font-size:11px; z-index:90; left:0px;"><a href="#" class="co">Home</a> <ul style="display:none; z-index:100; height:28px;"> <li style="background-image:url(images/sm-l.png); background-repeat:no-repeat; width:15px; height:30px;"></li> <li><a href="#" style="background-color:#EEE;">asa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li><a href="#" style="background-color:#EEE;">aa</a></li> <li style="background-image:url(images/sm-r.png); background-repeat:no-repeat; width:15px; height:30px;"></li> </ul> </li> </ul> CSS: Code: ul#navigation li.main { display:inline-block; list-style:none; position:relative; background-image:url(../images/tab_off.png); background-repeat:none; width:109px; height:8px; padding:10px; } ul#navigation li.main a { color:#FFF; } ul#navigation li.main:hover { background-image:url(../images/tab_on.png); background-repeat:none; } ul#navigation li ul { position:absolute; left:-50px; top:20px; } ul#navigation li ul li { display:inline-block; list-style:none; } Hope someone can help, Regards, Joe. Hello, Is there a way to stop an expanding page at a certain width? But yet keep the expanding feature? Right now as you can see from the below website that I am working on the page contracts and the images of course stay at there minimum width but the rest of the page keeps contracting...I don't like it doing that. Any ideas? web.bpro.com/agagency/index.htm Having read some of the posts in this forum, plus some other websites. With the over-lay capability of divisions could they be used for an expanding menu to show more links? how about positioning, would it be relative to the menu it just came from? would each menu be there but turned off by using: visability:hidden; ? would this menu be possible? Normal View:- home area 1 area 2 area 3 area 51 When Hover over area 51:- home area area2 area 3 area 51 vessel technology morgue artifacts Right now I'm trying to work a layout so that it'll stay a preset width unless there's overflowing unbroken content, and then I want it to stretch horizontally (as opposed to just running off the content edge with overflow:visible or scrolling inside the div with overflow:scroll). Min-width gets me to the width of the viewport (but that doesn't help me with the preset width - because there's enough text to go wider than the min-width, it'll go wider - I only want it to stretch if there's unbroken content), but then the divs stop at the edge of the viewport. Basically I'm trying to replicate table behavior. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "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> test</title> <link href="http://kushiel.sasktelwebsite.net/mockuphelp/scripts/primary_stylesheet.css" rel="stylesheet" type="text/css" /> <link href="http://kushiel.sasktelwebsite.net/mockuphelp/scripts/left_nav.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="innerContainer"> <div id="header"> <div id="headerImage"></div> <div id="headerLogoLink"> <a href=""><img src="http://kushiel.sasktelwebsite.net/mockuphelp/images/spacer.gif" width="182" height="94" border="0" alt="" /></a> </div> <div id="headerRandom"> <img src='http://kushiel.sasktelwebsite.net/mockuphelp/images/rotate2.jpg' alt="" width="300" height="125" border="0" /> </div> <div id="headerNav"> <div> </div> </div> <div id="contentWrapper"> <div id="nav"> </div> <div id="innerWrapper"> <div id="innerContent"> <table cellspacing="1" cellpadding="1" border="1" align="left"> <tbody> <tr> <td style="text-align: right;">2002</td> <td style="text-align: right;"> </td> <td style="text-align: right;">666.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,399.50</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,507.20</td> <td style="text-align: right;"> </td> <td style="text-align: right;">6,491.90</td> <td style="text-align: right;"> </td> <td style="text-align: right;">2,100.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">3,578.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">315.9</td> <td style="text-align: right;"> </td> <td style="text-align: right;">28,058.80</td> <td style="text-align: right;">2002</td> <td style="text-align: right;"> </td> <td style="text-align: right;">666.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,399.50</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,507.20</td> <td style="text-align: right;"> </td> <td style="text-align: right;">6,491.90</td> <td style="text-align: right;"> </td> <td style="text-align: right;">2,100.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">3,578.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">315.9</td> <td style="text-align: right;"> </td> <td style="text-align: right;">28,058.80</td> <td style="text-align: right;"> </td> <td style="text-align: right;">666.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,399.50</td> <td style="text-align: right;"> </td> <td style="text-align: right;">7,507.20</td> <td style="text-align: right;"> </td> <td style="text-align: right;">6,491.90</td> <td style="text-align: right;"> </td> <td style="text-align: right;">2,100.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">3,578.00</td> <td style="text-align: right;"> </td> <td style="text-align: right;">315.9</td> <td style="text-align: right;"> </td> <td style="text-align: right;">28,058.80</td> </tr> </tbody> </table> </div> <div style="clear:both;"></div> </div> <div style="clear:both;"></div> </div> <div style="clear:both;"></div> <div id="footer"> <div id="footerContent"> </div> </div> </div> </body> </html> Thanks! |