CSS - Divs In Table, Width/float Problems!
Here is the relevant HTML code:
<table> <tr> <td> <div style="float:left;"> <div class="middle"><div class="r"><div class="l"> <a id="gridtitle" href="javascript:void(0)" onclick="reload()"></a> </div></div></div> <div style="width: 200px;"> <a href="#" onclick="addheader()"><img border="0" src="tab_new_header.png" alt="Delete this grid"/></a> <a href="#" onclick="addfooter()"><img border="0" srctab_new_footer.png" alt="Delete this grid"/></a> </div> </div> <div style="float:right;"> <a href="#" onclick="javascript:toggleLayer('newgrid');"><img border="0" src="button_add.png" alt="Add a grid"/></a> <a href="#" onclick="deleteGrid()"><img border="0" src="button_delete.png" alt="Delete this grid"/></a> </div> </td> </tr> <tr> <td> <div id="gridbox3" class="gridbox" width="870px" height="600px" style="background-color:white;"></div> </td> </tr> </table> And the relevant CSS code [which just sets the background of the tab]: .l {background: url(../../datadir/client/images/billinggrid/name_sidebg1.png) 0 0 no-repeat; height: 43px;} .r {background: url(../../datadir/client/images/billinggrid/name_sidebg2.png) 100% 0 no-repeat; height: 43px;} .middle {background: url(../../datadir/client/images/billinggrid/name_sidebg.png); height: 43px;} This is the output (i can't post images?) http://i34 [.] tinypic [.] com/4hpqag [.] png The first problem I am having is that the div my gridtitle (CIBC) is in does not set its width automatically to the text width. Instaed, it spans the whole table ... Position-wise, I would like the tab with "CIBC" to be to the far left, the header and footer tabs to be right of "CIBC" but still floating left, and the + and x signs to be floating right, all on the same line. Help? Thanks in advance. Similar TutorialsI'm new to css web design and am attempting my first full layout. What I would like to do is have a hanging picture in the upper-righthand corner of the page that overlaps the header and content sections. All is well, until I specify a width or height on the content section. Although it looks fine in Firefox, IE either: a) moves the content section down or b) squishes the content to the side (if <!--<?xml version="1.0" encoding="utf-8"?>--> is in the html) Here's some much-simplified code to illustrate the problem: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link href="images/style_test.css" rel="stylesheet" type="text/css" /> <title>Sandbox</title> </head> <style type="text/css"> #header { background-color: #cccccc; border: 1px solid #564b47; } #content { background-color: #c6dedf; border: 1px solid #564b47; width: 100%; height: 400px; } #hanging { float: right; background-color: #ccff99; border: 1px solid #564b47; margin: 20px; padding: 0; width: 300px; height: 300px; clear: right; } #footer { background-color: #cccccc; border: 1px solid #564b47; clear: both; } </style> <body> <div id="hanging"><code>#hanging {<br> float: right;<br> background-color: #ccff99;<br> border: 1px solid #564b47;<br> margin: 20px;<br> padding: 0;<br> width: 300px;<br> height: 300px;<br> clear: right;<br> }</code><p>This SHOULD overlap header & content.</p></div> <div id="header"><code>#header {<br> background-color: #cccccc;<br> border: 1px solid #564b47;<br> }</code></div> <div id="content"><code>#content {<br> background-color: #c6dedf;<br> border: 1px solid #564b47;<br> width: 100%; /* hanging doesn't like this */<br> height: 400px; /* or this in IE*/<br> }</code></div> <div id="footer"><code>#footer {<br> background-color: #cccccc;<br> border: 1px solid #564b47;<br> clear: both; }</code></div> </body> </html> Anyone know a work-around or how to fix this? Thanks! This is hard to explain, so a visual aid is he http://dev.dave.imarc.net/examples/css-wants/ I have a page of content divs (grey blocks containing content) extending 100% wide, going down the page. I want to float a block of text to the right, and have it constrain any 'content' div it comes in contact with like this (pushing 1 box) or this (pushing 2 boxes) But all I get is the content div extending accross the page, and only it's content running arround the float like this: http://dev.dave.imarc.net/examples/css-wants/ the two CSS styles are listed in each box. Any ideas?? Thanks... Hey all, up until recently I have used the various styles and hacks using :after or clear:both; to rectify and force divs to clear. However knowing that these methods won't validate and aren't strictly proper, I've decided to ditch all those methods and try to sort floated divs out correctly. Here is the culprit; Code: <div style="height:144px; margin-bottom:10px;"> <div style="height:110px; padding:0px 0px 5px 0px;"> <div style="width:80px; height:110px; float:left;"> <div><!-- DYNAMIC IMAGE --></div> </div> <div style="width:655px; height:110px; float:left;"> <div style="padding:5px 0px 2px 10px;"><!-- DYNAMIC TEXT --></div> <div style="padding:5px 0px 2px 10px;"><!-- DYNAMIC TEXT --></div> <div style="padding:5px 0px 2px 10px;"><!-- DYNAMIC TEXT --></div> <div style="padding:5px 0px 2px 10px;"><!-- DYNAMIC DESCRIPTION --></div> </div> </div> <div style="height:29px; background-color:#D8D8D8;"> <div style="padding:7px 0px 0px 10px; margin:0px 5px 0px 0px; float:left;"><!-- DYNAMIC TEXT --></div> <div style="padding:7px 0px 0px 10px; float:left;"><!-- DYNAMIC TEXT --></div> <div style="padding:3px; float:right;"><!-- DYNAMIC TEXT --></div> </div> </div> The problem is with the contents of <!-- DYNAMIC DESCRIPTION -->. This is user entered through a HTML editor in their admin console. This can have line breaks etc. and therein is where my problem lies. I have restricted the showing of the "Description" text to 175 chars. Meaning, and providing the user enters more than 175 chars before a line break, it would rarely go on to a new line when displayed in the above page. However if a user added multiple line breaks the content would still display overlaying the bottom, and final div. Now I understand I could remove line breaks etc before rendering, but I would like not to have to do that, I would rather the "Description" div stretch to accomodate the text however it presents itself than run the risk of one day having "leaking" overlaying content. I tried the width:100%; overflow:auto; but this results in scrollbars. I don't want to use hidden either because again it rendered badly. I've also used clear:both; on the final div with no joy. Is there anything that can be done? I'm sure there is, maybe I just can't see the wood for the trees at the moment. Any suggestions would be hugely appreciated. Thanks in advance. Hopefully an easy fix and I'd appreciate any reference links I can bookmark. I have the following site with a navigation bar and content: jimspace.dreamhosters.com/whirligig The content is first in the source with a float: right and the nav bar next in the code with a float: left. In FF the items in the nav bar flow out of the DIV box as they should. When I switch to IE6, the DIV box expands to the size of the longest text causing a float drop. An overflow: hidden solves it, but then of course the nav bar items are cut off. Here's the relevant HTML: Code: <div id="content"> <h2>get whirligigged!</h2> <p>CONTENT</p> </div> <!-- content --> <div id="navcontainer"> <ul id="navlist"> <li class="a"><a href="#">Item one</a></li> <li class="b"><a href="#">Item two</a></li> <li class="c"><a href="#">Item three</a></li> <li class="d"><a href="#">Item four</a></li> <li class="e"><a href="#">Item five</a></li> <li class="f"><a href="#">Item six</a></li> <li class="g"><a href="#">Item seven</a></li> <li class="h"><a href="#">Item eight</a></li> <li class="i"><a href="#">Item nine</a></li> <li class="j"><a href="#">Item ten</a></li> </ul> </div> <!-- navcontainer --> And the relevant CSS: Code: div#content{float: right; margin: 90px 25px 0 0; height: 420px; width: 700px; clear: right; border: 1px solid red; } #navcontainer { float: left; width: 200px; border: 1px solid blue; } How can I get this to behave in IE6? Hi all, This is really annoying me and I don't think it should happen!! If you see this page, you will see one of the divs spans the whole page and it has gone behine the floated left element. Now if it wnt below it that would be OK as a block level element, but the content is in the right place. If you reduce the width it sits in its place OK. I think this is strange behavior.... is it correct????? http://www.wellandpower.net/website...req=www_contact Regards Charlie HTML: Code: <div id="title" class="title_lower_color"> <div class="title">TITLE</div> </div> <div id="main"> <div class="grouptitle1">Group 1 <div class="grouptext1">blah blah blah blah blah blah blah blah </div> </div> <div class="grouptitle2">Group 2 <div class="grouptext2">blah blah blah blah blah blah blah blah </div> </div> </div> CSS: Code: body { margin-top: 10px; margin-right: 10px; margin-left: 10px; } .title { font-family: "Times New Roman", Times, serif; font-size: 24px; color: #000000; font-weight: bold; background-color: #CCCCCC; border-color: #000000; border-bottom-style: solid; border-bottom-width: thin; width: 100%; float: left; position: relative; } .title_lower_color{ background-color: #666666; border-color: #000000; border-left-style: solid; border-bottom-style: solid; border-right-style: solid; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-style: solid; border-top-width: thin; width: 100%; height: 40px; float: left; position: relative; } .grouptitle1{ color: #000000; font-style: normal; font-family: "Times New Roman", Times, serif; font-size: 14px; font-weight: bold; position: relative; background-color: #CCCCCC; border-color: #000000; border-style: solid; border-width: thin; margin-top: 10px; width: 300px; float: left; } .grouptitle2{ color: #000000; font-style: normal; font-family: "Times New Roman", Times, serif; font-size: 14px; font-weight: bold; position: relative; background-color: #CCCCCC; border-color: #000000; border-style: solid; border-width: thin; margin-top: 10px; margin-left: 10px; float: left; } .grouptext1 { color: #000000; font-style: normal; font-family: "Times New Roman", Times, serif; font-size: 12px; font-weight: normal; position: relative; background-color: #FFFFFF; border-color: #000000; border-top-style: solid; border-top-width: thin; width: 300px; } .grouptext2 { color: #000000; font-style: normal; font-family: "Times New Roman", Times, serif; font-size: 12px; font-weight: normal; position: relative; background-color: #FFFFFF; border-color: #000000; border-top-style: solid; border-top-width: thin; } I've only just started using CSS rather than tables. The title bit is ok. The problem is the main <div>. In Firefox l can't seem to get the two divs (grouptitle1 & grouptitle2) to float side by side. The only way l can do it is by setting grouptitle2 to a certain width. But l want grouptitle2 to fill the remaining width of the screen whatever size the browser is and not be a set width. Is there any way so that l can make the two divs appear side by side without adding a width to the grouptitle2?? here's a working version: Clicky Hello, (please also see attached/uploaded style sheet) I'm puzzled why (in the following code) the TEST #2 table renders as required (i.e. 2 rows in 1 column, all with the same cell WIDTH) but the table in TEST #1 seems to render the table cells (i.e. 2 columns in 1 row) without a common cell WIDTH. How can I get all the cells (there are plenty more!) in table TEST #1 to all be exactly the same width (preferably 85px)? Code: <link rel="stylesheet" type="text/css" href="http://thinet/cgi-bin/thinetStyleSheet.css"> TEST #1 <table class="menu" border=1 CELLPADDING=2> <tr> <td class="pinkButtons"><a title="Treats menu" href='http://thinet/theread/forumdisplay.php?s=&forumid=82'>Treats</a></td> <td class="pinkButtons"><a title="New Starters, Leavers and Transfers" href='http://thinet/theread/forumdisplay.php?s=&forumid=41'>Joiners etc.</a></td> </tr> </table> <P> TEST #2 <table class="menu" border=1 CELLPADDING=2> <tr><td class="pinkButtons"><a title="Treats menu" href='http://thinet/theread/forumdisplay.php?s=&forumid=82'>Treats</a></td></tr> <tr><td class="pinkButtons"><a title="New Starters, Leavers and Transfers" href='http://thinet/theread/forumdisplay.php?s=&forumid=41'>Joiners etc.</a></td></tr> </table> I don't think I've quite grasped the idea of CSS yet?!?! Any help/pointers would be appreciated. Thanks, Andy Ok. Here's the problem: I have a asp.net 1.x datagrid inside a floated div and I want the datagrid to stretch the width of the div. This div is in the center of two other floated divs. Is there a way to make a table go 100% the width of its container div? Css code: Code: /* left bar: */ #navBar{ width: 185px; float: left; } /* right bar: */ #rightModulesContainer { width: 130px; margin: 0; padding: 0px 0px 0px 10px; float: right; } /* center content: */ #content{ padding: 0px 5px 0px 0px; margin-top:0; margin-bottom:0; margin-left:4px; margin-right:0px; float: left; text-align:left; /*display: inline;*/ } /* contained in #container: */ #dataGridContainer{ margin: 0; padding-bottom: 10px; min-width:360px; } .categoryGridStyle { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; color: #000000; width:100%; } and here is the layout of the divs: Code: <div id="navBar">left navigation bar here (tree view)</div> <div id="rightModulesContainer">right side bar here</div> <div id="content"><div id="dataGridContainer">datagrid here</div></div> Thanks for your help in advance. I've been messing with this for a while - trying to get it to work cross browser is driving me nuts. I've tried placing the divs in containers and floating the containers, I've tried everything I can think of... This is my code essentially: <div id="bottom"> <div style="float:left">store hours</div> <img src="map"> <div style="float:right">contact info</div> </div> It looks fine in Safari but it messed up in Firefox. I fixed it a bit by adding overflow:auto to the parent item (bottom div), so it actually has the red background and doesn't collapse. I haven't yet uploaded that fix yet as the problem still isn't solved. Now the div is expanding too much because the 3 items aren't being displayed inline. In firefox the image is pushing the first div beneath it. Any solutions please? Well, I'm trying to make a comments-page for a certain thing, and I can't get the image to stop going over the bottom of the div, without using the min-height property. Can someone help?
Code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; encoding=UTF-8;" /> <title>Comments on 2005-02-10: February 10, 2005</title>\n <link rel="stylesheet" type="text/css" href="comments.css" /> </head> <body> <h2>Posting on 2005-02-10: February 10, 2005 in <a href="refresh.php" id="title">XMLBlog</a></h2> <div id="entry" xml:lang="en-US" lang="en-US"> <img src="../resources/images/Neil_Euphonium_3_[F][S{600,h}][32k].png" alt="New Euphonium!" title="New Euphonium!" style="width:30%;" class="left" /> <p class="dream">I can only remember two things... That there were a whole bunch of people from my school playing baritones, which was kind of creepy in this case <em class="entry">and</em> that my section from school in real life and I played this freaky, nonexistent Zelda games. One was for a calculator I had only owned in the dream, and it was spectacular! </p> <p class="normal">I brought my "newphonium" to school today.</p> <p class="normal">We had a pretty normal session in Jazz. <em class="entry">Someone actually got a trombone solo.</em></p> <p class="normal">Our teacher was back. The entire first half of the period going over our homework. <em class="entry">We learned that dropping a penny off of the <strong class="entry">Space Needle</strong> is very dangerous, since even a baseball would get going at 120 MPH.</em> Later, we began how to calculate things dealing with gravity with a position other than 0 and a velocity over 0.</p> <p class="happy">We didn't do much in Japanese. All we really did was read Katakana and finish our puzzle. <em class="entry">A few of us found new words.</em> I also told our sensei that my real Japanese same from my ancestors is <ruby><rb>たけした</rb><rt>take****a</rt></ruby>. During resource, I looked over this book with a couple of friends of mine and their friend. <em class="entry">It was so funny, too!</em></p> <p class="normal">In Health, we continued our lecture on alcohol. <em class="entry">There were some inspiring articles and poems on the subject.</em></p> <p class="happy"><span class="normal">Class started off with a lock-down. <em class="entry">I used this time to complete a gravity-based program for physics.</em></span> to Due to my premature completion of the paragraph that was due at the end of the period, I just listened to music and read for the majority of English. <em class="entry">A big guy in the <info popup="State of Fear">book I'm reading</info> died.</em></p> <p class="sad">Before actually eating, I wandered a bit. <em class="entry">It made it so I didn't have to carry my backpack around wherever I went.</em></p> <p class="normal">We continued on proofs. <em class="entry">It took a bit of effort to do.</em> <span class="happy">Still, we finished the investigation.</span></p> <p class="normal"><span class="happy">I got my new euphonium for class.<em class="entry">It sounded very nice.</em></span> Though, for a majority of the time I didn't do anything with my section, due to his preoccupation with a couple of other kids.</p> <p class="happy">I got a ride home</p> <p class="normal">I had a practice session with my mom, which wasn't the most successful.</p> <p class="happy">Once done with my homework, I took a two-hour nap.</p> <p class="dream">The entire thing revolved around this country area that had tiny roads and a <info popup="The salmon eggs would get bigger, then would grow spikes and split apart before returning to their grating to mature more">freaky salmon farm</info>. Also, I remember psychically communicating with my section from Band. <span class="hider">I actually cried over the idea of losing him, but I didn't have tears when I awoke.</span> Also, my old friend, who is a freshman now, was mentioned.</p> <p class="happy">The dream gave me the idea to call him up. <em class="entry">Apparently, the call woke him up.</em> We talked about how our lives were going, along with school. <em class="entry">Apparently, the school banned people from using their calculators. How could they!? He also told me that some kids were goofing around during Breakout library time.</em> We scheduled a time to meet and talk about some more things. <em class="entry">I could show him Linux.</em></p> <p class="happy"><strong class="entry">I fixed the comments system!!</strong> <em class="entry">Have fun posting.</em></p> </div><p>No comments</p><hr /><form action="postcomments.php?ie=&title=February 10, 2005&date=2005-02-10" method="post" name="comment" id="main"> <div class="right"> <img src="comments_files/right_main_bar.png" alt="right_side" /> </div> <div class="left"> <img src="comments_files/left_main_bar.png" alt="left_side" /> </div> <div class="center"> Date: <input type="textarea" class="upper" name="date" value="2005-02-10" readonly="readonly" /> Title: <input type="textarea" class="upper" name="title" value="February 10, 2005" readonly="readonly" /> <br /> Name: <input type="textarea" name="name" class="lower" /> E-mail: <input type="textarea" name="e-mail" class="lower" /> </div> <div class="comment"> <input type="textarea" name="comment" class="text" /> <input type="submit" value="Post!" class="click" /> </div> </form> </body> </html> CSS: Code: h2 { text-align:center; font:bold italic 3em/1.5 'Pepita MT', 'Lucida Handwriting', 'Sans-Serif'; color:rgb(0,150,150); } h3 { text-align:center; font: italic normal 2em/1.5 'Lucida Calligraphy', 'Sans-Serif'; color:rgb(0,0,150); } form#main { display:block; } form#main div.left { float:left; background-color:rgb(255,255,255); } form#main div.right { float:right; background-color:rgb(255,255,255); } form#main div.left img, form#main div.right img { height:60px; } form#main div.center { background-color:rgb(0,0,0); background:url(comments_files/center_main_bar.png); font:bold normal 1em/1 'Times New Roman', 'Courier New', 'Sans-Serif'; color:rgb(255,255,255); padding:2px 18% 2px 28%; } form#main div.center input.upper { height:20px; filter: alpha(opacity=50); -moz-opacity: .5; display:inline; width:20%; margin:2px 10% 2px 0; } form#main div.center input.lower { height:20px; filter: alpha(opacity=50); -moz-opacity: .5; display:inline; width:20%; margin:2px 8% 2px 0; } form#main div.comment { width:95%; border:1px solid rgb(0,150,150); } form#main div.comment input.text{ width:90%; margin:5px 5% 5px 5%; height:100px; } form#main div.comment input.click { width:25%; margin:5px 37.5% 5px 37.5%; } body p { text-align:justify; font: italic normal 1.2em/1 'MS Mincho', 'SimSun', 'Sans-Serif'; color:rgb(150,0,0); } a { color:rgb(0,100,0); text-align:left; } a:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } a#title { color:rgb(0,100,0); text-decoration:none; margin-left 25%; text-align:left; } a#title:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } div.comment a.mail { font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; color:rgb(0,100,0); text-decoration:none; text-align:left; } div.comment a.mail:hover { font-weight:bold; color:rgb(0,255,0); border:1px solid rgb(0,255,0); } div.comment span.mail { margin-left 25%; font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; color:rgb(0,0,150); text-align:left; } div.comment { border-bottom:2px dotted rgb(0,0,255); margin:1.5em; } div.comment p { font:normal normal 1.2em/1.1 'MS Mincho', 'SimSun', 'Courier New', 'Sans-serif'; display:block; } /* ENTRY */ div#entry { border:4px double rgb(0,0,0); padding:0.25em; margin:0.5em; min-height:79em; } div#entry p { font:normal normal 1em/1.2 'Tempus Sans ITC', 'Nimbus Roman', 'Times New Roman', 'Serif'; text-indent:2em; text-align:justify; } div#entry p.dream { font:normal normal 1em/1.2 'Lucida Handwriting', 'URW Chancery L', 'Serif'; color:rgb(150,150,0); text-indent:2em; text-align:justify; } em.entry { font-style:italic; } strong.entry { font-weight:bold; } span.uentry { text-decoration:underline; } span.hider { color:rgb(255,255,255); } div.story { border-left:2px solid rgb(0,0,0); border-top:2px solid rgb(0,0,00; } div.story div.title { border-bottom:1px solid rgb(128,128,128); border-right:1px solid rgb(128,128,128); font:italic normal 1.5em/1.2 'Tempus Sans ITC', 'Nimbus Roman', 'Times New Roman', 'Serif'; width:50%; text-align:center; } div.story div.storybody { padding:0.25em; } span.happy, p.happy { color:rgb(0,100,0); } span.sad, p.sad { color:rgb(0,0,100); } span.normal, p.normal { color:rgb(100,0,0); } img.center { margin:0.25em auto; } img.right { float:right; margin:0.25em; } img.left { float:left; margin:0.25em; } Hi, I'm trying to redesign my website to be CSS and XHTML compliant. While I've managed it and everything is almost perfect, IE has one very minor glitch. The page is http://hiveworldterra.ibboard.co.uk/HWTv2.html My 3-col design is based on (and modified from) a 3 col layout I found on the net (there is a credit in the CSS of the page).IE displays everything perfectly and even resizes horizontally without a problem, but as soon as you try to resize vertically, the left column will often overlay the center column. Refreshing the page without resizing the window fixes it and resizing the page horizontally fixes it. As per usual, Firefox is perfectly fine, no matter how you resize the page (until you get down to rediculously small, at which point its to be expected!) It doesn't seem to be a width issue, as I've got a 1280x1024 monitor at work and at full width on one monitor or down at 500px wide there are only a handful of vertical sizes where the left column doesn't overlap, but every time it does overlap then if you resize horizontally by a single pixel then it fixes itself. Anyone have any ideas or IE only hacks (preferably neat ones!) to stop this minorly annoying behaviour? From problems I had while modifying the original layout, it almost seems as if IE is losing the float on the left column. Thanks I hope I can explain this in a way that makes sense. I have a table layout where the number of columns is variable (sometimes it can have 1 column, sometimes it can have up to 9 columns), depending on what data is filled out on a previous form. The code in question: Code: <tr> <td> <div style="float: left; width: 13px"><img src="arrow.gif"></div> <div style="float: left; width: 93%;">My explanatory text goes here!</div> </td> <td> Column 2 Text </td> <td> Column 3 Text (and so on) </td> </tr> The two divs there need to float next to each other -- the first div is a little 13x13 arrow, the second div is some explanatory text. I can not just float the image left (and not put the text in a div), because the client wants the text to be left aligned in the div, not wrapping around the image. The issue: If there are less than 5 or 6 columns, it works beautifully. If you put more columns in there, then the second div appears below the first div. I've been fiddling with the widths on the second div, but it has to be a percentage (not a set number of pixels), because the number of columns is variable (as is the width of those columns). How can I make the columns float next to each other regardless of the width of the table cell that they are within? Any help is appreciated. Hey everyone, Just released v2 of my design site - but there's a problem with the floated sidebar in IE6. http://www.quiviramedia.com/ is the site. http://www.quiviramedia.com/style.css is the CSS URL. What is the problem? Does anybody know? Thank you! Hello everyone!! Great community you have going here! I am working on a personal project, and try to do all the work myself (hired a designer at one point but the best he could do is a table based layout ) The site is based on the drupal CMS and the zen theme. And currently the them has problems when rendered in IE7 everything is getting jammed in the top left corner in IE7 and IE8 compat mode: drupal.org/files/issues/IE8_compat.GIF some people tried to combat this issue by adding this to the IE specific stylesheet: CSS Code: Original - CSS Code #header, #main {overflow: hidden;} #header, but it does not solve the problem 100% drupal.org/files/issues/IE7vsIE8_overflow_hidden.GIF I've been searching for a fix for some time but with no luck, so if you people have any suggestions I would be super appreciative! The live site could be viewed he techbine.nfshost.com P.S. to see the images copy/paste the links to the address bar (I have a low post count so can't link directly ) Hey. On my page I've got smaller "post" div's I put my content in, and those are inside a "mainContent" div again. They have fixed width and I can get two of them beside each other, which works fine with float:left - but if I have two posts with variable height, then the next post on the page will be below the highest one. I uploaded an example at http://www.zaklaberg.tk. I was wondering how I can make it so my post elements stack properly on top of each other? My css-rule for the post div tags looks like this: Code: .post { padding: 5px; height: auto; width: 330px; margin-bottom: 50px; margin-left: 30px; background-color: #CCE3C1; float: left; } The rest of my css is at http://home.online.no/~ste-labe/_css/main.css. Thanks in advance for any help! Here's the link of the messy page: http://205.205.200.231/~h806209/indexmess.php I need someone to tell me why the float left/right isn't aligning properly. I posted the link above. Here's an example that works: http://205.205.200.231/~h806209/positioning.php and http://205.205.200.231/~h806209/positioning1.php One's in a style tags the other's inline. But when I insert my codes it shows things messed up. Firefox 3.6 is showing a blank screen for everything I have set as 100% width but looks ok in Firefox 5. My main concern at this point is this: I'm trying to figure out how to move the 4 navigation items (the owl, contact, portfolio and home) closer to the tree without going over or under it. Any help or suggestions I can get are much appreciated! ------------------------------------- Here's the HTML: 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>ATHENA STUDIOS - web design & graphic design in Charlottetown, PEI</title> <link rel="shortcut icon" href="layout/hoot.ico" /> <link rel="stylesheet" type="text/css" href="athena.css" /> </head> <body> <div id="page-wrap"> <!-----page wrap div start------> <div id="top"> <!-----top div start ------> <img src="layout/header.png" alt="header image ATHENA STUDIOS WEB DESIGN, GRAPHIC DEIGN & FRONT END DEVELOPMENT" /> </div> <!-----top div end ------> <div id="navbar"> <!-----nav bar BACKGROUND div start------> </div> <!-----nav bar BACKGROUND div end------> <div id="navigation"> <!-----navigation div start------> <ul id="menu"> <li class="owl"><a href="index.html">Owl</a></li> <li class="contact"><a href="/contact/">Contact</a></li> <li class="portfolio"><a href="/portfolio/">Portfolio</a></li> <li class="home"><a href="index.html">Home</a></li> </ul> </div> <!-----navigation div start------> </div> <!-----page wrap end div------> </body> </html> ----------------------------------------- And here's the CSS: Code: @charset "UTF-8"; /* CSS Document */ body { width:100%; font-size: 13px; font-family: Helvetica, Verdana, Arial, sans-serif; line-height: 1.4; background: url(../layout/bg.png); background-attachment:fixed; margin:0; padding:0; text-align: center; } a, a:link { color: #000000; text-decoration: none; } a:hover { color: #31636c; text-decoration: none; } a.footer:link { color: #ddcfb2; } a.footer:hover { color: #ddcfb21; } a.footer:visited { color: #ddcfb2; } a.footer:active { color: #ddcfb2; } #page-wrap { width: 100% ; margin: auto ; text-align: center; } #top { width:100%; background:url(layout/skybg.png); background-repeat:repeat-x; text-align: center; position:relative; z-index: 500; } #navbar { width:100%; height:102px; margin-top:-139px; padding-top:15px; background:url(layout/navbg.png); background-repeat:repeat-x; } #navigation { width:100%; height:155px; text-align:center; margin-top:-154px; } /* Everything CSS Sprite Menu */ ul#menu { text-align:center; position:relative; z-index: 501; padding:0; list-style:none; clear:both;} #menu li{overflow:hidden; text-indent:-9999px; display:inline; text-align:center; float:left; margin-right:10px;} #menu li a{background:url('layout/navigation.png') no-repeat; width:100%; height:100%; display:block;} /* Owl Button */ #menu li.owl{width:158px; height:146px;} #menu li.owl a{background-position:0px 0px;} #menu li.owl a:hover{background-position:0px -2px;} /* Contact Button */ #menu li.contact{width:150px; height:158px;} #menu li.contact a{background-position:-158px 0px;} #menu li.contact a:hover{background-position:-158px -2px;} /* Portfolio Button */ #menu li.portfolio{width:238px; height:146px;} #menu li.portfolio a{background-position:-308px 0px;} #menu li.portfolio a:hover{background-position:-308px -2px;} /* Home Button */ #menu li.home{width:114px; height:146px;} #menu li.home a{background-position:-546px 0px;} #menu li.home a:hover{background-position:-546px -2px;} NEVER MIND. Got it. lol I have two div tags that I want to float next to each other. The page looks like this <table>These Tables stretch 100% of the width</table> <table>''</table> <div class="ParentDiv"> <div class="menuholder"></div> <div class="ChildDiv"></div></div> in FF everything works the way I want to. In IE if I shrink down the browser then the second div tag drops below the first. I want to change this so that it does not drop below but remains in the same place. Is there anything I can set to do that? If I remove the float and change the position on the menuholder the childdiv tag does not drop but the menuHolder content does not stretch the size of the parentDiv and gets chopped off at the height of the childDiv Code: .ParentDiv { position: relative; width: 100%; width:expression(document.body.clientWidth < 997 ? '997px' : '100%'); min-width:997px; max-width:100%; overflow:hidden; min-height: 400px; } .ChildDiv { position: relative; width: 100%; min-height: 400px; } .menuholder { background-color: #EFF3F5; color: #eef; position: relative; float: left; left: 0px; top: 0px; overflow: hidden; width: 160px; z-index: 100; } Hey. First post on here, so hopefully you lot are very helpful I've been asked to make a site for someone I know, and I've done the design, made most of it in CSS and a little php for navigation alerations. The URL for the website is: (URL address blocked: See forum rules) The problem that I'm seeming to have, is that in IE7 the footer only takes the value of the #bottom_container height, and ignores the #left and #right that are inside this container. Meaning that, the footer rides up to the middle of the page, as shown: [IMG](URL address blocked: See forum rules)[/IMG] Does anyone know how to solve this? It's performing well in Safari and Firefox, and even IE6! Just not the new one. I know it's something to do with the height of the botom container, but each page is going to have different amounts of content, so I cant set a height for all of them. Thanks very much! Nick. |