CSS - Positioning Problem: Overflow Into Next Column?
hi guys, i was wonering if it was possible to do the following:
Say i have three columns, and i want to list category names (dynamically from a database). how would I make it so the first 'column' would stay at a fixed height and forward the next category name into the top of the next column? I know this is an odd question. ebay has a working example of what I'm trying to achieve here. if you view all categories you will see they have 3 columns, and the categories flow through each of the three. i have a feeling the solution to this might be quite easy, but i just haven't found it. anyone know how to do this? Similar TutorialsFirst let me say that I understand why people are using the div / css layer driven table formatting for creating thier column & row layouts. When you place things in a div layer and position them with the css you can control the complete position and look from just the css file. Unlike a table, where everything is restricted to the positioning of the table layout. WOW AWSOME! Now, let me say that for the past 18 hours I have seen nothing but utter bull**** spit out in css. For the past 3 years I have been doing professional web design and for the past 3 years all the design that has come from me has been done (for the most part) in table data. Now, I use CSS a lot, so dont get me wrong... But for positioning and mimicing table layout I have never really gotten into it. Recently we got into a new project that may become very large and my need much updating and changing. The lead programmer of the company suggested to the boss that it all be laid out in div layers controlled by css. So, that means that I have to do it. Great, not such a big deal, but the layout they want and the browsers they want it in I just dont see happening. The layout is as so: Code: |1-| |2---| |3-| | | | | |--| |--| | | | | |4-| |5-| |----| |--| | | |6--| |7--| |--| |---| |---| If that makes any sense to you. Now, not only does it have to conform to all the browsers, it also has to work with Dreamweaver so they can easily manage content, and... Not to mention that it has to work with the new IE 7 when it comes out. Now, I have searched and searched for methods on how to make the layout like I described above, and nothing! I keep finding these hacks that will be obsolete in IE7! And, none of this **** renders correctly in Dreamweaver. My boss is on my tail all day hasseling me for updates. Its almost time for bed yet and I am still stuck in this same situation! Why does the layout even need to be in this css positioning anyways? It seems to me that if the website is developed correctly, with includes and all tha bit, than using css for positiong is completly pointless! NOTHING renders the same between IE and Mozilla browsers, NOTHING! Im so frustrated right now I will probably get fired for this **** tomarrow because I told the boss I would have it for tomorrow not realizing that css sucked the big one. If anyone could tell me a place that would make magical css div positioning in all browsers and Dreamweaver for multicolumn & row support please let me know. I dont think it exists, and I think I will try to convense my boss to just use table code. CSS positioning is trash, if it isnt the floats loosing the order, the borders rendering on the outside of explorer, the 1px center graphic positioning, or the rest of the junk that causes me to loose my cool with css, its going to be the lame creation of table formatting that makes me bash my computer into the ground. Anyways, thanks... I hate divs Hey, I'm trying to make a 3-column layout, and I'm having troubles with IE positioning the 3rd column. The address is URL . I have no problems trying to make one where the middle column is the "main" one, but for some reason it is working out now. Also, if possible, I'm also trying to put in a footer image that will cover the whole part of the bottom (from the far left of the browser to the far right of the layout. It's perfectly fine in Firefox, but IE looks bad Thx P.S. here's an image of my problem, since it might look different when someone looks at it as i might still be screwing around w/ it <img src="http://img.photobucket.com/albums/v411/mflotron91/problem.jpg"> OK, I'm back for another CSS lesson - this time on lists. My site is designed with typical three-column layout. The left and right columns are floated and the center column contains most of my content. Sometimes in the center column of a page I want to include a list, either ordered or unordered. This page is a splendid example: http://stallinswebdesign.com/vs/general_OfficersContactInfo.php. I do not yet know how to manipulate the positioning of a list (and lots of other block-level things, truth be told). 1. Can you share with me how to nudge this unordered list (with list-style-type set to none) to the left a wee bit so that it lies about 1em to the right of that left border? 2. Can you share with me a CSS standards-based technique for marking up the first element of a list so that it is left-adjusted and all of the following list elements are indented from it (and I can adjust the amount of indentation), so the list looks like this: Code: My Team Euskaltel-Euskadi 2005 Orbea Orca is a kick-tail bike because every cyclist knows that orange and black are the fastest colors any bike that wins Frame of the Year and Bike of the Year is a winner the frame stiffness is top-shelf, and the power transfer is amazing Or, if one can do that with semantic markup other than lists, please let me know. Thank you all for looking; I appreciate your effort. I'm trying to create a 3 column layout where all the columns are contained within 1 larger <div>. So far I've managed to create 3 columns using absolute positioning that dont allow the back-ground image of the containing <div> to show through. If I use relative positioning, the background-image shows, but the columns are set relative to one another and they stagger from left to right in a diagonal fashion. I can correct it using negative values for the "top" attribute, but it seems bushleague and its incredibly tedious. Is there anyway I can have 3 PROPER (not using the above method) columns while also having the largest containing div's back-ground image show through them? The following gives me the staggered layout: Code: .leftColumn{ margin-left:20px; width:100px; border:thin dotted #999999; } .middleColumn{ margin-left:121px; width: 450px; border:thin dotted #999999; } .rightColumn{ margin-left:572px; width: 200px; border:thin dotted #999999; } .main{ left:200px; width: 950px; background-image: url(Images/PaperBkg.gif); background-repeat:repeat-y; } <div class="main"> <div class="leftColumn"> </div> <div class="middleColumn"> </div> <div class="rightColumn"> </div> </div> Thanks guys. Hello! I'm new to CSS, so any help would be greatly appreciated! I'm working on this page: sugarhooker[dot]com/testing/index2.html *The CSS is included in the head The right column is suppose to start where it says 'Are you hooked...' It should be right underneath the navigation bar. Anyone know what I'm doing wrong? Thanks in advance! Can anyone give me a lead as to where to start fixing the job IE6 is displaying my website? It looks ok in IEmac, safari, firefox, opera and netscape. My style sheet validates, and the xhtml for the page is valid with exception of the php counter within the div on the side, yet I took that out and tested and the same results occurred in IE6. Any help is greatly appreciated. url = bluewebpages.com EDIT: side menu, with addition of 'height:15px' to the #side ul li a, should display fine when i upload the changed css file, but the posts still display out of whack... Please look at the site I'm designing for my friend he http://www.vpntunnel.net/newsite/ http://www.vpntunnel.net/newsite/css/general.css Notice how #content is running over the specified width, well outside the #container, even. This is noticeable with h1 on the homepage and on the FAQ page. I'm not quite sure what's causing it. Also, if someone could help me center the page in IE, that'd be great. I'd rather not use text-align: center; in the body. Hello, I have a basic test page with 3 boxes ( http://www.pages4u.net/css/overflow.html ). Firefox renders my page as I want but IE makes it very different way. How can I correct the IE version? Thanks in advance! This is most likely a well documented problem, but I can't seem to find information on it. The site I'm building looks very nice in Firefox, but in IE6 my thumbnail gallery flows outside its container and overlaps everything and there is a scrool bar, but it does nothing. For pages with text inside the scroll, instead of the thumbs, it works fine. See it for yourself: http://brucethorn.com/php/index.php/paintings << bad http://brucethorn.com/php/index.php/resume << good Also, some odd but subtel things happen in Opera and the thumbsnails don't float right/borders cut off on one side/gaps etc, but it is not devistating. The filmunits(thumbs) are inside "scroll" which is inside "content." The relevant(I hope) CSS is below: div.scroll {height:344px; width:800px; margin:8px 0px 8px 0px; overflow:auto;} div.content {height:392px; width:800px; margin:auto; text-align:center;} #filmunit {height:128px; width:128px; border:4px solid black; margin:8px; float:left; position:relative; overflow:hidden;} #filmunit[id] {display:table; position:static;} #filmsub {position:absolute; top:50%;} #filmsub[id] {display:table-cell; vertical-align:middle; text-align:center; position:static;} #filmimage {position:relative; top:-50%;} #filmimage[id] {position:static; top:-50%;} Thank you! Hi everyone, I am having a problem with the 'overflow' property in Internet Explorer6. I am working on an image slide show.The images are displayed in two divs whose CSS is as follows: #imageBox { margin: auto; width: 450px; border: 1px #000 solid; overflow: hidden; height:90px; z-index:500;} #imageBoxInside { width: 10000px; height:90px;float:left;overflow:hidden; z-index:200; } #imageBox img { float: left; padding: 0px; margin: 0px; } #imageBox br { clear: both; } In mozilla firefox it is working perfectly. But in IE6 the 'overflow' property doesn't work . Please help. My CSS works in IE and Mozilla but not Netscape or Opera I have a 2 column website, built with 2 relative position DIVs, with overflow set to auto. Because of this, I turned off overflow on the body tag and on the html tag (overflow: hidden;). I didn't want to have 2 scroll bars on the right side of the window. When I first tested this on 4 browsers, IE, Mozilla, Netscape and Opera, it worked great, only having one scroll bar on the right side of the window when the page was longer than the window height. But when I moved to a new host server recently, I discovered that Netscape and Opera stopped working. They now simply give me blank screens. When I remove the "overflow: hidden;" specifications from the body tag and the HTML tag in my CSS file, Netscape and Opera once again display my web pages. However, now I get 2 scrollbars on the right side of all 4 browsers (in IE, the second scrollbar isn't actually there, but the space holder for the scrollbar is there). Is there a cross browser way for doing what I'm trying to do? Or am I faced with detecting the browser type on the server-side, and setting the style sheet appropriately? Here are the related parts of my CSS: /* CSS styles */ BODY { font-family : Verdana, Arial, Helvetica, sans-serif ; font-size : 10pt; background : Black; color : White; margin: 0; padding: 0; border-width: 0; overflow: hidden; } HTML { overflow: hidden; } #LeftNavDIV { position:relative; width:185px; height:100%; float:left; padding:2px 0px 0px 0px; margin:0px 0px 0px 0px; border:1px solid white; overflow:auto; } #ContentDIV { position:relative; height:100%; width:75%; float:right; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; border:0px dashed #336699; overflow:auto; } I am trying to make a realy simple CSS menu but I came across a stupid thing. When I try to do a click on one of the submenus the whole menu shifts to the right. This is dumb because the ul has a padding of 1em. Why is it behaving this way when overflow is set to hidden in FFox ? Is there a workaround or a solution ? But here is the menu page. The CSS is in the source but I will also post it here. Page Code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Menu</title> <style type="text/css"> #mainnav{ line-height: 1.33; background: #CCC; margin: 0; padding: 0; vertical-align: top; /*This is the problem in FF*/ overflow: hidden; /*If overflow is Hidden then FF shifts the submenu and the main menu to the right (1em)*/ width: 183px; border: thin red dashed; } #mainnav ul{ list-style: none; margin: 0; padding: 0; border: none; width: 100%; } #mainnav li{ font-size: 90%; margin: 0; padding: 0; width: 100%; } #mainnav ul ul, #mainnav ul ul ul{ /*The left margin*/ margin: 0 0 0 1em; padding: 0; } #mainnav li a{ color: #000051; text-decoration: none; display: block; margin: 0; padding: 0; width: 100%; } #mainnav ul li a{ padding: 0.8em 0.5em 0.8em 1em; border-bottom: 1px solid #333; } #mainnav ul li a:hover{ background-color: #C0C090; padding: 0.8em 0.5em 0.8em 1em; border-bottom: 1px solid #333; } #mainnav ul ul li a, #mainnav ul ul ul li a{ padding: 0.2em 0.5em 0.5em; border-bottom: 1px solid #333; border-left: 1px solid #333; } #mainnav ul ul li a:hover, #mainnav ul ul ul li a:hover{ background-color: #C0C090; padding: 0.2em 0.5em 0.5em; border-bottom: 1px solid #333; border-left: 1px solid #333; } #mainnav .navsectionhead{ color: #FFFFFF; text-decoration: none; background-color: #3D556B; display: block; margin: -2px 0 0; width: 100%; } #mainnav .subnavsectionhead{ color: #FFFFFF; text-decoration: none; background-color: #9A9A73; display: block; margin: -2px 0 0; width: 100%; } #mainnav li .navsectionhead a{ color: #CDCD9A; text-decoration: none; background-color: #3D566C; display: block; margin: 0; width: 100%; } #mainnav li .navsectionhead a:hover{ color: #FFFFFF; background-color: #466580; } #mainnav ul .here{ color: #FFFFFF; text-decoration: none; background-color: #3D556B; display: block; margin: -2px 0 0; padding: 0.8em 0.5em 0.8em 1em; width: 100%; border: none; } #mainnav ul ul .here{ color: #FFFFFF; background-color: #333333; display: block; margin: -2px 0 0; padding: 0.2em 0.5em 0.5em; width: 100%; } html>body #mainnav li a, html>body #mainnav .navsectionhead, html>body #mainnav .subnavsectionhead, html>body #mainnav .subnavsectionhead a, html>body #mainnav ul .here, html>body #mainnav ul ul .here, html>body #mainnav ul ul ul .here{ width: auto; } </style> </head> <body> <div id="mainnav"> <ul> <li><a href="">:: Home</a></li> <li><span class="navsectionhead"><a href="Gallery.php">:: Gallery</a></span> <ul> <li><a href="">> Sept 2005</a></li> <li><a href="">> Oct 2005</a></li> <li><a href="">> Nov 2005</a> </ul> </li> <li><a href="">:: Download</a></li> <li><a href="">:: School Related Info</a></li> <li><a href="">:: Shoutbox</a></li> <li><a href="">:: About</a></li> </ul> </div> </body> </html> Thank you in advance. I'm having some very bizarre display issues with some styled lists on one of my pages in internet explorer. It's displaying fine in Firefox and Safari, however. Any help or insight would be greatly appreciated: http://dev.lotusguild.info/roster/manage The background isn't cover the list properly and selected list items seem to float in place while the rest of the list scrolls. Thank you in advance! Hi again, Can anyone let me know if they have encountered this problem before. Its caused me around 12hrs of headaches so far.. The problem is that in Firefox this works perfectly, but in IE7 i cannot get it to be 100% of the browser window, it always takes 100% of the gif image. A good test is with a browser window of 800x600 If I change class test to fixed width for example width:614; instead of width:100%; then it seems to work perfectly again. Many thanks in advance. G. -----SNIP <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <style> .test { z-index:1; width:100%; overflow: auto; } </style> </HEAD> <BODY> <table width="100%" border="1" cellpadding="0" cellspacing="0"> <tr> <td><img src="(URL address blocked: See forum rules)" width="169"></td> <td width="100%"> <div class="test"> <table><tr><td><img src="(URL address blocked: See forum rules)"></td></tr></table> </div> </td> <td><img src="(URL address blocked: See forum rules)" width="169"></td> </tr> </table> </BODY> </HTML> ------- I see my images have been removed, the two outer cells are just a 169 wide spacer The inner image was 850 wide, just add any image of this size to try. Thanks again. G hi the following img will help u understand the layout of my page. my page content is in <td id="cont"> my links are in <div id="scroll"> i have got several links in that div and i made the div scrollable with the following code. Code: <table id="tab"><tr> <td id="iframe"> <div id="scroll"> <ul> %%links%% </ul> </div> </td> <td id="cont">%%content%%</td> </tr></table> Code: #tab{width: 100%;} #iframe{width: 25%; vertical-align: top; padding-top: 3em; } /* only for ie */ * html #scroll{overflow: auto; width: auto; height: 100%; text-align: left; } /* only for firefox */ #scroll{overflow:auto; width: auto; height: auto; text-align: left; } #cont{width: 75%; height: 100%; vertical-align: top; text-align: center; padding: 2em; } my links <div> is scrollable in ie but not in firefox. in firefox i see all the links with no scrollbar. i know i would get a scrollbar in firefox if i say height:400px; instead of height: auto; but that's the problem. i want the height of <div id="scroll"> to depend on <td id="cont">. that means the height of the scrollable links should depend upon the height of the content. thank you (sorry posted to wrong forum) Hi, I'm new to CSS (and Javascript) and am wondering how to fix a <div> overflow on my site (www.logicland.co.uk). here is my CSS code: Quote: /* Font CSS */ body { font-family: Arial, Helvetica, sans-serif; } #footer { font-size: 11px; } /* Layout CSS */ body { padding: 0px; margin: 0px; background-color: #D0DFEF; } #container { margin: 10px; border: 1px solid white; background-color: #6699FF; } #header { padding: 1px 7px 1px 7px; border-bottom: 1px solid white; height: 60px; background-color: #6C86DC; } #columnA { width: 150px; position: relative; float: left; padding: 5px; } #columnB { margin-left: 160px; margin-right: 160px; padding: 10px; border-left: 1px solid white; border-right: 1px solid white; background-color: #CCD5F2; } #columnC { width: 150px; position: relative; float: right; padding: 5px; } #footer { padding: 1px 3px 1px 3px; border-top: 1px solid white; text-align: right; background-color: #DDE3FF; } Is there simply a property I can change to cause the right <div> to push the footer down like the middle column does. Any info would be great. Cheers, BuckRogers01 I have a division containing an object for which I would like scrollbars to appear when (and only when) needed... to do this I have set "overflow: auto" ... and it works as desired -- everywhere except Internet Explorer for Windows... in that browser the scrollbars always appear no matter how small the object. the relevant segment: <div style="float:left; margin-top:1em; width:220; height: 220; overflow:auto;"> <object style=" overflow:auto;" data="/danceFeed.php?$getString" type="text/html" width=220 height=219 ;> Set your location defaults to display local events automatically</a> </object> </div> I have also tried "overflow:hidden" & "overflow: visible" (in both places); omitting it in the object; adding "overflow:hidden" to the page body (as recommended by at least one "bug site") and trying variations on the size of the object relative to the containing div. No luck. The border of the object is clearly visible, so when the object is smaller than the available space, the (unneeded) scrollbar extends well below the bottom of the object... any ideas for a work around? I'm having a little trouble with the Overflow attribute on my side scrolling website. I have uploaded 2 versions one and two of the same site, one with
Code: overflow:hidden; overflow-x:visible; and one with just. Code: overflow:hidden; the first one is completely static in safari and won't scroll at all but scrolls really nicely in firefox (with a scroll wheel as there are no scroll bars). The second one has a horizontal scroll bar but goes really wierd and starts scrolling horizontally as well which I don't want to happen as it messes up my site. Is there a way to get the site to scroll horizontally without scrolling vertically? I have tried it both this way and by only using Code: overflow-y:hidden; but it has similar results. Any help on this would be greatly appreciated My layout is not liquid. everything is fixed position. If the veiwer adjusts his text size in his browser then part of the content text in the div's will be pushed out of sight because {overflow:hidden;} has me covered. How do I get the content in the div to become scrollable in this case? I don't know if it's possible but I don't really want to have scroll bars on my div's UNLESS the user adjusts text size and forces it to happen. Can this be done and if so any Ideas on how to do it? |