CSS - Text Wrapping Content Around A Floated Image
hi,
i successfully managed to text wrap content around an image that was floated to the left (within a div element).... however, i now want an image with a caption and thus i want to text wrap the content around the div element containing the image and caption which is floated to the left... however, i cannot work out how to do this and performing a google search has not helped - can someone help me here? Similar TutorialsThe text in the <p> isn't wrapping around the image in IE. Works fine in FF. What am I doing wrong? Code: <div class="floatright"><a href="./images/storyimages/1192298760_15.jpg"><img class="storyimage" border="0" src="./images/storyimages/thumbs/1192298760_15thumb.jpg" alt=""></a><br>This is a caption</div> <p> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse viverra, orci venenatis consectetuer faucibus, purus nibh feugiat libero, nec pulvinar nulla orci ut lectus. Ut pellentesque pharetra erat. Proin quis lacus ut sapien ullamcorper consectetuer. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse viverra, orci venenatis consectetuer faucibus, purus nibh feugiat libero, nec pulvinar nulla orci ut lectus. Ut pellentesque pharetra erat. Proin quis lacus ut sapien ullamcorper consectetuer. </p> This is all in the main_col_right <DIV>. Here's the CSS: Code: .floatright { float: right; margin: 0 10px 10px; } #main_inner_wrap { margin:0 auto; width:690px; } #main_inner_wrap p { font-family: Geneva, Verdana, Arial, Helvetica, sans-serif; font-size: .9em; line-height: 1.4em; padding:0 10px; min-height: 100%; } #main_col_left { float:left; width:150px; color: #330; line-height: 1.5em; } #main_col_right { margin-top: 0; float:right; width:540px; color: #330; background:url("./images/news_bg.gif"); background-repeat: repeat-y; } Hi, I'm fairly new to CSS but I've been enjoying working with it. I've now stumbled onto a problem that is making me tear my hair out. I have a centered, fixed width 2-column design. and I'm trying to insert an image and float it left so that the text in the div wraps around it. The problem is that the image keeps being pushed down to the 3rd or 4th paragraph instead of the actual paragraph it's placed in. What could be causing this? I've included my code below. Thanks! Code: /*----------PAGE CENTERED AND FLUSH TOP-----*/ *{margin:0px; padding: 0px; } /*---------------BODY BACKGROUND------------*/ body{ background-color:#333333; } /*-----------BACKGROUND-CONTAINER-----------*/ #background-container{ width: 780px; background-color:white; margin: 0px auto; padding-top:0px; padding-bottom:0px; font-family:Arial; font-size:10pt; } /*-------HEADER ELEMENTS----------*/ #banner{ width: 780px; height: 200px; background-color:#CC9900; background-image:url(); border-bottom: 5px solid #333333; } #header{ width:770px; background-color:#FFFFFF; background-image:url(vertical-scanline.jpg); padding-left:10px; font-family: Arial; font-size:29px; font-weight: bold; } /*-----------BEGIN DROP-DOWN MENU--------*/ div#listmenu{ background-color:#860505; font: 10pt Arial; float:left; width:780px; margin: 0px auto; } div#listmenu ul{ margin: 0 0 0 30px; } *html div#listmenu ul{ float:left; border-left: 1px solid gray; margin-left:15px; } *html a{display:block; color:#FFFFFF;} div#listmenu li{ float:left; position:relative; background-color:#860505; list-style-type:none; padding: 0 6px; border-right:1px solid black; } div#listmenu ul li ul{ margin: 0px; position:absolute; width:10em;} div#listmenu ul li ul li{ width:100%; border-left: 1px solid gray; border-right: 1px solid gray; border-bottom: 1px solid gray; } div#listmenu li{first-child: border-left: 1px solid black; } div#listmenu ul li ul li {first-child: border-top: 1px solid gray; } div#listmenu a{ text-decoration:none; font-weight:bold; color:#ffffff; display:block; padding: 0 6px; background-color:#860505; } div#listmenu a:hover{ background-color:#FFFFFF; color:#000000; } body div#listcontainer ul li ul {display:none;} div#listcontainer ul li:hover ul { display:block; } div#listcontainer ul li:hover ul, div#listcontainer ul li ul:hover {display:block; z-index:25; } /*-----------END DROP-DOWN MENU--------*/ /*-----CLEARING ELEMENT BEGIN---------*/ .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix {display: inline-block;} * html .clearfix {height: 1%;} .clearfix {display: block;} /*-----CLEARING ELEMENT END---------*/ /*--------------MAIN CONTENT---------*/ #main-container{ background-color:#ffffff; } /*----------COLUMNS--------*/ #sectionright{ width:190px; background-color:#860505; border-bottom: 5px solid #333333; font-family:Arial; font-size:14px; font-weight:bold; color:#FFFFFF; text-indent:20px; float:right; } #rightcol{ width:190px; background-color:#CCCCCC; font-family:"Arial"; color:#000000; font-size:12px; text-align: left; text-indent:20px; border-bottom: 5px solid #333333; padding:0px; float: right; clear:right; } #subscription{ width: 190px; background-color:#CC9900; border-bottom: 5px solid #333333; font-family:Arial; text-align:left; font-size:10px; margin-bottom:3px; float: right; clear:right; } #crisp{ width:190px; height:150px; background-color:#FFFFFF; border-bottom: 5px solid #333333; font-family:"Arial"; color:#000000; font-size:11px; text-align:left; float:right; clear:right; margin-bottom:3px; } #logo{ width:190px; height:90px; background-color:#FFFFFF; border-bottom: 5px solid #333333; float: right; clear:right; } #left-floater{ width:150px; padding-top:50px; float:right; background-color:#FFFFFF; font-size:11pt; } #floater-bottomleft{ width:150px; padding-top:50px; float:right; background-color:#FFFFFF; font-size:11pt; } #bottom{ width: 675px; clear:right; background-color:#FFFFFF; margin-top: 15px; margin-bottom: 15px; } #footer{ height:15px; width: 780px; background-color:#999999; font-family:"Arial"; font-size:10px; text-align:center; margin-top:5px; clear:right; } /*-----------BODY ELEMENTS-------*/ .subheader{ background-color:#D1A10D; font-family:"Arial"; font-size:19px; font-weight: bold; text-align:left; text-indent:5px; padding-top:5px; padding-bottom: 2px; } .pagesub{ background-color:#FFFFFF; font-family:"Arial"; font-size:16px; font-weight: bold; color:#860505; text-align:left; margin-top:5px; margin-bottom: 5px; } .column-title{ width: 190px; font-family:Arial; color: #000000; font-size: 14px; font-weight:bold; text-align: center; } div#main-container img { float:left; border: 1px solid #333; } /*------PARAGRAPH PROPERTIES-----*/ .p-main{ width:560px; margin-left:5px; padding-top:10px; padding-bottom:10px; text-align:justify; font-size:10pt; } ul{ padding-left:15px; list-style:none; } .pcolumn{padding-left: 40px;} .p-ul{font:10pt Arial;} .ptop{margin-bottom:5px;} /*----------------LINK PROPERTIES--------------*/ a:link{color:#000000; background-color:transparent;} a:visited{color:#CC0000; background-color:transparent;} a:active{color:#000000; background-color:transparent;} /*-----------RIGHT COL AND CRISP LINK PROPERTIES----*/ div#rightcol a:link{color:#000000; background-color:transparent;} div#rightcol a:visited{color:#CC0000; background-color:transparent;} div#rightcol a:active{color:#000000; background-color:transparent;} div#crisp a:link{color:#000000; background-color:transparent;} div#crisp a:visited{color:#CC0000; background-color:transparent;} div#crisp a:active{color:#000000; background-color:transparent;} /*------HTML BELOW-----*/ <body> <div id= "background-container"> <div id="listmenu"> <div id="listcontainer" class="clearfix"> <ul> <li><a href="http://www.crge.umd.edu">Home</a></li> <li><a href="#">Who We Are</a><ul> <li><a href="#">Director's Message</a></li> <li><a href="#">Staff</a></li> <li><a href="#">Faculty</a></li> <li><a href="#">Funders</a></li> <li><a href="#">Affiliates</a></li> </ul> </li> <li><a href="#">Research</a> <ul> <li><a href="#">Research Program Areas</a></li> <li><a href="#">Research Interest Groups</a></li> <li><a href="#">CrISP Research Training Program</a></li> <li><a href="#">Intersectional Research Database</a></li> </ul> </li> <li><a href="#">Publications</a> <ul> <li><a href="#">Research Connections 2007</a></li> <li><a href="#">Research Action Briefs</a></li> <li><a href="#">Campus Report</a></li> </ul> </li> <li><a href="#">Resources</a> <ul> <li><a href="#">Professional Opportunities</a></li> <li><a href="#">Alternative News Sources</a></li> <li><a href="#">Tools from Graduate Colloquium</a></li> </ul> </li> <li><a href="#">Events</a> <ul> <li><a href="#">Graduate Colloquium</a></li> <li><a href="#">QRIG Seminars</a></li> <li><a href="#">MC/VC Series</a></li> <li><a href="#">Calendar</a></li> </ul> </li> <li><a href="#">Media</a> <ul><li><a href="">Press Releases</a></li></ul> </li> <li><a href="#">Contact Us</a></li> </ul> </div> </div> <div id="header">The Consortium on Race, Gender and Ethnicity: CRGE</div> <div id="banner"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="780" height="200"> <param name="movie" value="CRGEbanner.swf"> <param name="wmode" value="transparent"> <embed wmode="transparent" src="CRGE%20banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="200"></embed> </object> </div> <div id="sectionright">Who We Are</div> <div id="rightcol"><p class="p-right"><b>In This Section</b></p> <p><ul> <li><a href="http://www.crge.umd.edu/about.html" target="_blank">Director's Message</a></li> <li><a href="http://www.crge.umd.edu/staff.html" target="_blank">Staff</a></li> <li><a href="http://www.crge.umd.edu/faculty.html" target="_blank">Faculty</a></li> <li><a href="http://www.crge.umd.edu/funders.html" target="_blank">Funders</a></li> <li><a href="http://www.crge.umd.edu/affiliates.html" target="_blank">Affiliates</a></li> </ul></p> <br> <br> </div> <div id="subscription"> <form method="post" action="http://www.emailmeform.com/fid.php?formid=35482"> <INPUT TYPE=hidden NAME=FCode VALUE="8gdrzytp"> <table cellpadding="2" cellspacing="0" border="0" bgcolor="#CC9900"> <tr> <td> <font face="Arial" size="2" color="#000000">Subscribe to CRGE's Listserv</font> <div style="" id="mainmsg"> </div> </td> </tr> </table> <br> <table cellpadding="2" cellspacing="0" border="0" bgcolor="#FFFFFF"> <tr valign="top"> <td nowrap><font face="Arial" size="2" color="#000000">Name</font></td> <td> <input type="text" name="FieldData0" value="" maxlength="100" size="20"> </td> </tr> <tr valign="top"> <td nowrap><font face="Arial" size="2" color="#000000"> Email</font></td> <td> <input type="text" name="FieldData1" value="" maxlength="100" size="20"> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td></td> <td align="left"> <input type="text" name="hida2" value="" maxlength="100" size="3" style="display : none;"> <input type="submit" class="btn" value="Subscribe" name="Submit"></td> </tr> </table> </form> </div> <div id="logo"><p align="center"><img src="umlogo.gif"></p></div> <div id="main-container"> <p class="subheader">Director's Message</p> <p class="p-main"><img src="btdill2.jpg" width="150" height="175" />Welcome to the Web site for the Consortium on Race, Gender and Ethnicity.</p> <p class="p-main">The Consortium is an association of academic units and individual faculty on the University of Maryland campus whose mission is to promote, advance, and conduct research, scholarship, and faculty development that examines the intersections of race, gender, and ethnicity with other dimensions of difference.</p> <p class="p-main">Established in 1998 with support from the Colleges of Arts and Humanities, Behavioral and Social Sciences, the Graduate School, and the Office of the Provost, the Consortium seeks to: support, coordinate, and facilitate the activities of the many outstanding faculty and academic units at Maryland engaged in scholarship that focuses on intersections of race, gender, and ethnicity; and to build visibility both on and off-campus for our exceptional wealth of resources.</p> <p class="p-main">Through our affiliates, community partners, and research interest groups, we encourage an intellectual climate that supports collaboration. Through our Research Program Areas, we promote approaches that contextualize the lives and experiences of the individuals and groups that participate in our research. Through this Web site and other dissemination efforts, we develop applications of knowledge to human problems. Through a variety of research training opportunities we seek to transfer intellectual capital to upcoming generations.</p> </div> <div id="footer"><p>Home | Who We Are | Research | Publications | Resources | Events | Media | Contact Us</p></div> </div> </body> Hi, I have a problem that I'm trying to figure out. If I have a div such as the following: PHP Code: #Div1 { background: url(title.gif) no-repeat; position: absolute; top: 30px; left: 30px; width: 387px; height: 55px; .. which I want to be able to use absolute positioning to place within my page. My question is, is there a way to make it so that text will wrap around it (such as a regular aligned image) instead of the text appearing underneath it? I'm having trouble getting text to wrap within a DIV. In my purposely garish sample code below, what I want is for the image and the paragraph to appear side by side within the red DIV, with the paragraph wrapping onto multiple lines as necessary. What happens instead is that if the paragraph is too long to fit on one line beside the image, the blue DIV moves underneath the red one and the text remains on one line. Not what I want at all! 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> <style type="text/css"> p { margin: 0 0; color: white; } #title { background-color: red; height: 105px; } #left { float: left; margin: 20px 20px; background-color: yellow; } #right { float: right; margin: 20px 20px; background-color: blue; overflow: hidden; } </style> </head><body> <div id="title"> <div id="left"> <a href="index.htm"><img src="http://i52.tinypic.com/2u9l5z9.png" alt="" width="429px" height="65px" border="0" /></a> </div> <div id="right"> <p>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.</p> </div> </div> </body></html> If you shorten the paragraph you can see where I want the text to be displayed. It's only when it exceeds the available width within the red DIV that the whole blue DIV moves further down the page, where the text is suddenly quite happy to start wrapping. This can probably be solved with a single line of CSS but I've been trying all sorts with no joy. Can anyone please pinpoint what I need to do? Hello, i know this quest has been asked a few tims before as i did a search on it, but could not find an answer to help.. (though i may have missed it as i havet slepted in days) i have this setup on a page where i have a table of 4 imgs in the top right of the main table.. the text starts at the top left but dose not wrap under the images once its long enough and past the images.. (ill try and draw it for you here) .......== .......== ....... ....... ....... ....... ....... the . is my text the == is a image (/ is just a space), above is what its doing, what i need is for it to do this .......==/== .......==/== ............... ............... ............... thats what i need. i hope this shows what i mean :P any help would be great thanx. I have a box that I use for a container and then another box inside of that set to a width. When I put text into the inner box the text seems to go beyond what it should. Can anybody tell me what might be wrong with it. Code is as follows----\ Code: .content_contain {/* This is the main container for the content, its width run 100% of the wrapper */ height: 575px;/* Gives it a height so that when the main_content block is empty it still holds a size. */ width:100%; z-index:0; } .main_content {/* This is the main content, this will hold the left menu and right content */ height:100%;/* Height is set to 100% so that it will grow when the text goes beyound 550px of the main container */ width:750px; margin:0px auto; text-align:left;/* Have to use text-align:left becuase of the body text-align:center hack for IE */ position:relative; background:white; border:1px solid white; z-index:5; } Thanks for any help that you guys can come up with... Stephen I have a span that displays a message generated from ASP. The message is not wrapping like I expected it to. My CSS for the span looks like this, #message { padding:5px; font:bold 100% Arial, Verdana, Helvetica, sans-serif; border: 1px dashed #000000; } And my HTML looks like this, <span id="message">This is a sample message. This is a long message that will not wrap as one would expect.</span> When the message is long, the span wraps, but it overlaps the first line. I have tried adding float:left to it, but then it becomes so wide that scrollbars are displayed. I could add a width with the float, but if I do that then the short messages look funny when displayed (the border goes the whole width, and therefore there is whitespace to contend with). How can I make this wrap like would be expected (no overlap)? Thanks, Drew I use a css class to control my text around an image, but it does not print floated. Instead it prints like they are block elements. Code: img.newsthumb{ float: left; clear: left; padding-right: 5px; border: 0px; } img.newsthumb2{ float: right; clear: right; padding-left: 5px; border: 0px; } Any clue on how to fix this. Hi there I am having some trouble with my CSS dropdown menus. I have a floated div that contains a welcome paragraph and a menu that drops down. What is happening is that the menu is being drawn behind the text of the welcome paragraph (see attached image). Here are the classes... This draws the welcome text Code: #welcome { float:left; z-index:0; width : 360px; height:160px; margin-left:10px; margin-top:30px; font-size: 0.8em; } And this is the classes for the dropdown Code: .dropdownlink a { display:block; width:150px; height:19px; font-size:0.8em; color:#000000; background: url(../images/nav_drop_bg.gif) top left no-repeat; text-decoration: none; padding-left:10px; z-index:1000000000; } and this is the HTML for the menu... Code: <div id="nav_1" style="visibility:hidden; position:absolute; top: 37px; left:28px; height:100px; width:128px;"> <div class="dropdownlink"><a href="">Pain</a></div> <div class="dropdownlink"><a href="">Pain</a></div> <div class="dropdownlink"><a href="">Pain</a></div> <div class="dropdownlink"><a href="">Pain</a></div> <div class="dropdownlink"><a href="">Pain</a></div> </div> has anyone got any idea why this is ignoring the Z-index? It works in Opera, but in looks crap in IE. Is this a common problem, are there any workarounds. Please help, I'm pulling my hair out ! Before I state the problem, let me say that I am working towards properly validated html and css. There are a couple tables in my design that I put in just to show the boss something pretty! They will be gone soon. I have 3 places on the page where I'm using images as links to effect behavior with javascript or forms. My menu's going down the left side of this template has +/- "buttons" to toggle nested lists on and off. By using margin-top:-14px they are lining up slightly higher then needed in FF, slightly lower then needed in IE and way to high in Safari. If i set the margin-top to 0, then I get it lined up nicely in safari and IE and FF are off. The images inside of the <li>'s This is the css code I believe to be relevent css Code: Original - css Code .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } div.redbox img.plusminus { float:right; margin:-16px 3px 0 0; padding:0 0 0 0; height:10px; } .clearfix:after { html Code: Original - html Code <li id="item1" class="border-bottom clearfix"> <a href="/store/category/50">T-SHIRTS</a> </li> <li id="item2" class="border-bottom clearfix"> <a href="/store/category/51">PANTS</a> <a onclick="toggle('item2');"><img src="/images/closed.gif" alt="closed image" class="plusminus" class="plusminus" id="img_item2" /> </a> <ul id="ul_item2" class="closed"> <li class="sidebarsub"> <a href="/store/subcategory/325">PROTECTIVE</a> </li> </ul> </li> <li id="item1" class="border-bottom clearfix"> <a href="/store/category/50">T-SHIRTS</a> </li> <li id="item2" class="border-bottom clearfix"> <a href="/store/category/51">PANTS</a> <a onclick="toggle('item2');"><img src="/images/closed.gif" alt="closed image" class="plusminus" class="plusminus" id="img_item2" /> </a> <ul id="ul_item2" class="closed"> <li class="sidebarsub"> <a href="/store/subcategory/325">PROTECTIVE</a> </li> </ul> </li> Is this a common thing in CSS that there might be a tutorial out there on how to fix it? I've looked at using overflow and that doesn't seem to fix the problem. the link for the page... Template Thanks for having a look hey guys, im not the greatest with css and html but i do it for fun to try and teach myself. Anyways I have a css drop menu set up on my site and I am having a problem with the width sizes in the actual drop down. The text length is of various sizes in the drop down. (some are long single words, some are 2 words etc) and I am using a width size of 11em which in all browsers using a standard screen res shows up fine. but if somebody uses a smaller screen res the text starts wrapping. Where you get the 2 word lines split into 2 lines. and then If i increase the size sometimes I get separate <li>'s on the same line. Its pretty frustrating. What I want to do is be able to increase the width size of the drop menu and even have all kinds of extra padding on the right if I want but without <li>'s spilling onto the next line or without <li>'s sitting on the same line cause its too big. Here is my CSS for the drop. Code: #nav li ul { background: #FCDFFF; background-image: url('images/background.png'); border-style: ridge; border-width: 5px; border-color: #000000; margin-top: 0px; position: absolute; font-size: 95%; width: 11em; left: -999em; line-height: 2; z-index: 999; } anybody know how I can do what Im looking for? Thanks in advance! I am a bit lost as to how to accomplish the following: I have two divs of unequal width, let's say 300 and 100 for example. I need to float both of these divs to the right and have them stacked on top of each other. That's easy enough on it's own, but I need text to wrap around them properly. ie if the wide one is on top the text should flow to it's left edge, then flow underneath it it the narrow divs left edge, then underneath the narrow one. I tried doing this with relaitve positioning, but have had no luck. If I simply float them both to the right, they line up side by side as expected. If I wrap them both in one container div, the text will flow to the left edge of the wide div but obviously not wrap underneath it to the left edge of the narrow div. Any ideas? Anybody know how to force a long string of text that doesn't contain any spaces to wrap inside its containing div, and not just sprawl outside of the entire page? I've done some searching and can't seem to find a lot of discussion about this particular problem. If the content contained enough spaces, then the overflow would wrap nicely, but there aren't any. What am I missing here? Thanks Trying to achieve this: I'm having trouble figuring out how to float the right ad space correctly. This is what i've got so far: http://gatehouse.graffetto.com/floating_divs.html Code: Code: <html> <head> <style type="text/css"> .mainDiv {margin: 0; border: 1px solid black; padding: 10px; width: 600px; float: left;} .image {height: 100px; width: 100px; background-color: red; float: left;} .rightAd {float: right; background-color: blue; height: 250px; width: 300px; clear:right; margin-top: 300px;} </style> </head> <body> <div class="mainDiv"> <div class="image">test</div> <div class="rightAd">test</div> <div class="textDiv"> Text content </div> </div> </body> </html> I know this is simple i just can't figure it out for some reason.. thanks for any help. On page - URL address blocked I have an img floated to the left, with some text floating around the right side. After this image, I have an h2, styled to clear:both, with a top-margin: 3em. With this floated image preceding, when the image is longer than the paragraph or other text floating around it, and the bottom of the image is "sitting on top of" the h2, the browser ignores the 3em top margin on the h2, unless I include a br, styled to clear:both. So, I can solve the problem with this clearing break, but it sort of chafes me. This doesn't look like typical collapsing margin. I'm not losing the overlapping margin between the two elements, I'm losing all of the margin! The page is coded with the breaks in place. I can re-create the "issue" using Firebug to remove the br tag. Suggestions? Thanks in advance. he http://www.cyclomedia.co.uk/?ie6escape.html i worked out a much better way to do this layout (no inner tables) but this bug in IE6 still persists in this version. the html and css validate so i doubt it's something i've done. kudos to anyone who can figure it out but as a note, if you add another floated div (just containing enough content to wrap e.g. "...") then it holds the image in! Hello, first post here... I have an image floated left, with an unordered list (ul) next to it. Problem is, the margin values I set for the list are totally ignored, so the list bullets end up overlapping the image. Seems the only solution is to set margins on the image, but that also pushes away non-overlapping content, like the h3 that is above the list and positioned fine. Any ideas? Everything works fine if/when I float the list left, but that seems draconian... Code: css Code: Original - css Code img.alignleft { margin-right:0.5em; display:inline; float:left; } ul, ol, dl { line-height:1.5em; margin:0 0 1em 1em; }
HTML4Strict Code: Original - HTML4Strict Code <p><img src="" width="295" height="400" class="alignleft"/></p> <h3>A Sampling of Workshops We Have Brought to Nonprofits</h3> <ul> <li>An Introduction to Social Media for the Nonprofit</li> <li>An Introduction to Storytelling for the Nonprofit</li> <li>Using Social Media and Digital Storytelling in the Classroom</li> </ul> <p><img src="" width="295" height="400" class="alignleft"/></p> Hello DevShed CSS Help Forum, I have a wierd problem (seems I have a knack for that ) with a design I'm working on. When you first go to this page there is some disruption around the two floated columns in the background image that is assigned to the body tag: (Right now the page is only working in non-IE browsers, but I don't know any developers that regularly use IE anyways...LOL) http://www.spidersend.com/new_site/newsite4/test6.html However if you refresh the page or click to another tab and then back to that page it corrects itself. Once I remove the sidebar and the float property from the css on the main content area the issue is gone so it has to be something to do with that. Has anybody experienced this before? I just find it odd that it doesn't stay messed up, but corrects itself, even if you refresh and clear the cache. Confusing and wierd. Any ideas? Theories? Any and all ideas are much appreciated. Here is the CSS: Code: body { background-color: #FFFFFF; padding: 0px; margin: 0px; font-family: "arial"; background-image: url('images/bottom_slice.png'); background-repeat: repeat-x; background-position: bottom center; } div#header { background-image: url('images/header_slice3.png'); background-repeat: repeat-x; height: 198px; width: 100%; } div#header-content { width: 680px; margin: 0px auto; } div#top-navigation { width: 680px; margin: 0px auto; position: relative; bottom: 16px; color: #FFFFFF; font-family: "arial"; font-size: 16px; padding: 0px; } div#content { width: 850px; float: left; } div#content-header { background-image: url('images/content_bg_top.png'); width: 850px; height: 30px; } div#content-footer { background-image: url('images/content_bg_bottom.png'); width:850px; height: 32px; } div#content-area { background-image: url('images/content_bg_slice.png'); padding-left: 18px; padding-right: 18px; } div#adbar { width: 157px; float: right; } div#adbar-header { background-image: url('images/sidebar_top.png'); width: 157px; height: 30px; } div#adbar-footer { background-image: url('images/sidebar_bottom.png'); width: 157px; height: 26px; } div#adbar-area { background-image: url('images/sidebar_slice.png'); padding-left: 5px; padding-right: 5px; } div#sidebar { float: right; clear: both; position: relative; right: 10px; background-color: #d2e7f0; width: 300px; -moz-border-radius: 5px; padding: 5px; margin-left: 15px; color: #0c577a; } div#sidebar2 { float: right; clear: both; position: relative; right: 10px; background-color: #d2e7f0; width: 300px; -moz-border-radius: 5px; padding: 5px; margin-left: 15px; margin-top: 20px; color: #0c577a; } div#content-wrapper { width: 1007px; margin: 0px auto; } In Firefox, I've got a right div that is not repsonding to an auto width in FF. I am not a pro a CSS (yet ) and I hope that someone can give me the one line solution that I am missing. I've included a screen shot of the problem, any help is greatly appreciated. - K CSS Code Code: #MainContainer { float: left; width: auto; } #Main { margin-right: 0.2em; } #MainContent { padding: 0.5em 0.5em 0.5em 0.5em; } #SidebarContainer { float: right; width: 250px; border-top: 1px solid #C0C0C0; padding-top: 5px; clear: right; } #Sidebar { padding-bottom: 5px; background: #ADADAD; background-image: url(../images/SidebarBackground.jpg); background-repeat: no-repeat; clear:left; } #SidebarContent { margin: 0.2em 0.2em 0.2em 0.2em; } Greetings, I have a 3 column layout with a header, nav bar, content space and footer on the center column, making the center column have 4 rows. The content div's height is set to auto and it's overflow to auto so that when the browser is maximized on higher resolutions it will expand and contain the text without a scrollbar. alternatively it will give a scroll bar if the content div is shrunk below 300px. however the auto height on the content div is causing it to take up more room than necessary. if the window is shrunken down, the content text will leak out over the footer bar and beyond. Before i post code does anyone have any suggestions on what i should be looking for? If code is wanted lemme know. |