CSS - Floating Problem Only With Firefox
I dont know what I am doing wrong. I checked one of the online templates and actually I got the idea from an online template. I want to float columnist image to left, short text to right with these codes. It appears fine at ie but in firefox text appears line under image. Here; http://www.pearl.ru/isdunyasi
#maincontentcolumns { float:left; margin-right:2px; width:598px; height:150px; background:#FFFFFF url(images/innerheadline_bg.gif) top no-repeat; } #maincontentcolumns h1 { padding:0px; margin-bottom:5px; font-size:14px; font-weight:bold; color:#FFFFFF; } #maincontentcolumns .c { float:left; margin:0px 2px 0px 2px; width:292px; height:80px; } #maincontentcolumns .c img { float:left; position:relative; height:80px; width:80px; padding:2px; } #maincontentcolumns .c p { float:right; padding:2px; margin:0; font-size:14px; } PS: This is my last working with ie not with firefox message. I started testing with firefox. When it works with firefox it surely works with ie. Similar Tutorialsi have divs on a page, and the ones appearing on the left don't use any style (style=""), where as on the ones appearing on the right use (style="float: right; clear: right;") in IE 6 and 7, it creates the needed visuals found in the first attachted file (ie 7.gif).. as is seen, it clears the content so that the end of the divs are always in line, so that the next divs can begin properly in line in mozilla firefox (mozzila firefox.gif), it does not obey this idea, and simple starts the next divs after the end of the above ones.. you can imagine how problematic this is when some divs on the right contain ALOT of words, that should be inline with the one of the left, etc any thoughts or anything that could help would be apprciated... regards I am using a <dl> list to render dates and titles for a press release page. I want to display the date first and then display the title on the same line next to the date. If the title needs to wrap to more than 1 line, it should not wrap below the date - its left margin should be consistent. Simple example: Code: <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> dl { width: 100%; } dt, dd { float: left; margin: 5px; } </style> </head> <dl> <dt>12.24.2006</dt> <dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi consectetuer cursus lacus. Nullam imperdiet diam sit amet dui. Suspendisse nonummy, ante ut pharetra vehicula, augue neque porta arcu, vel adipiscing lorem augue eu purus. Aenean vulputate pellentesque arcu.</dd> </dl> <body> </body> </html> My problem is that with a long title that wraps to more than 1 line, Firefox is putting the <dd> on its own line - it will not float it next to the <dt> as it should. If you change the title to something shoter like Code: <dd>A ShortTitle</dd> It displays as it should. Any ideas why this is happening? The problem is that I have a wrapper div that will contain two "boxes", one that has a white background one that has a black background. I want the white background box to be to the left of the black background box, but inside the wrapper div which has a red background. It works just fine in IE (which surprised me) but Firefox is doing something really strange. The black background box starts all the way to the left of the wrapper with the white background box on top of it. Not only that, but the text for the black background box starts below the white background box. I'm new to inserting code, but I'll give it a try: 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> <title>linking to style sheets 2</title> <style type="text/css"> body { background-color: #ccccff; } h1 { font: bold 20px arial, tahoma, verdana; color: #6633ff; border-bottom: 1px solid #444444; margin: 25px 0; padding: 5px; } p { font: 15px verdana; line-height: 1.5em; color: #000077; margin: 0; padding: 0; } .leftbox { width: 300px; background-color: #ffffff; padding: 10px; margin: 10px 10px; float: left; } .rightbox { width: 300px; padding: 10px; margin: 10px 10px; background-color: #000000; } .wrapper { width: 800px; background-color: #ff0000; } .end { clear: both; } </style> </head> <body> <div class="wrapper"> <div class="leftbox"> <h1>Heading 1</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras pede sem, lobortis tempus, sodales sed, vehicula vitae, lorem. Fusce nec massa id erat lobortis semper. Vestibulum dignissim orci et orci. Fusce quis tortor eu sapien gravida pretium. Sed vel lacus. Aliquam erat volutpat. Pellentesque suscipit imperdiet nibh. Vivamus ut turpis. In leo. Quisque augue. </p> </div> <div class="rightbox"> <h1>Heading 1</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras pede sem, lobortis tempus, sodales sed, vehicula vitae, lorem. Fusce nec massa id erat lobortis semper. Vestibulum dignissim orci et orci. Fusce quis tortor eu sapien gravida pretium. Sed vel lacus. Aliquam erat volutpat. Pellentesque suscipit imperdiet nibh. Vivamus ut turpis. In leo. Quisque augue. </p> </div> <div class="end"></div> </div> </body> </html> You'll see that I've floated the white background div, but again, this is making that div sit on top of the black background div. Can anybody help? P.S. I know this isn't really pleasing to the eye, but it's just for demonstration purposes my goodness what a popular site this seems to be. im just a n00b in css and xhtml right now, but hopefully not for long. im trying to use a table to arrange the images in my website introduction page. im trying to make the page look exactly the same no matter the browser window size. im trying to float the two images that have the names programmingimg.gif and programmingtext.gif, but they are not floating to the right, they are just staying adjacent to the other image in the same cell. one other problem that i am having is, that the only way for me to stretch the background gif across the window size it to fake a background. its just the first image in the file with a z index of -1. this works in FIREFOX but not in IE. in IE, nothing can be seen except the background image. does anyone have a solution to either of these 2 problems? css: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Patrick Allard's Very Graphic Website</title> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <img src="backgroundfire2.gif" alt="background image" id="bg" /> <table border="1" class="introlayout"> <tr> <td class="introtitle"> <img src="titlemaxfontgreyredfire.gif" alt="background image" id="titleimg" /> </td> </tr> <tr> <td class="skillpics"> <img src="analogskillspic.jpg" alt="background image" id="analogskillsimg" /> <img src="programmingpic.jpg" alt="background image" id="programmingimg" /> </td> </tr> <td class="skilltext"> <img src="analogskillsmaxfontblackbluefire.gif" alt="background image" id="analogskillstext" /> <img src="programmingmaxfontblackbluefire.gif" alt="background image" id="programmingtext" /> </td> </tr> <td class="menu"> <img src="mainmenumaxfontblackbluefire.gif" alt="background image" id="mainmenuimg" /> </td> </tr> </table> </body> </html> html: Code: html, body { height: 100%; margin: 0; padding: 0; } img#bg { position:fixed; width:100%; height:100%; z-index:-1; } img#titleimg { width:100%; } img#mainmenuimg { text-align:center; width:30%; } img#analogskillsimg { width:40%; height:60%; } img#programmingimg { float:right vertical-align:bottom; width:40%; height:60%; } img#analogskillstext { vertical-align:bottom; width:40%; } img#programmingtext { float:right width:40%; } table.introlayout { width:100%; height:100%; } td.introtitle { width:100%; height:10%; } td.skillpics { vertical-align:bottom; width:100%; height:70%; } td.skilltext { vertical-align:top; width:100%; height:10%; } td.menu { text-align:center; width:100%; height:10%; } The image below is how I want my website to look (div-wise, that is). It looks like this on all platforms and on all browsers except IE 5.0 and 6.0: IE 5.0 and 6.0 render the following: I have included my html + css code below. I have tried to make #sidenav float:left instead of float:right. This makes no difference for browsers but IE 5.0 and 6.0, which then again render the page wrong. Also decreasing the width of #sidenav (i.e. to 20px) doesn't help; the result is the same. Could somebody please help me fixing this There must be at least one css guru out there today All help is greatly appreciated! Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test</title> <style type="text/css"> body { margin: 0; padding: 0; } #main { background-color: red; text-align: center; } #wrapper { text-align: left; margin: 0 auto; width: 300px; } #content { background: yellow; width: 200px; float: left; margin-left:50px; } #logo { background-color: lime; } #mainnav { background-color: pink; } #subnav { background-color: navy; } #text { background-color: orange; } #sidenav { background-color: blue; width: 50px; float: right; padding-top: 50px; } #footery { clear:both; background-color: #fff; } #footer { background-color: pink; margin: 0 auto; width: 200px; } #logo, #mainnav, #subnav, #footer { min-height: 30px; } </style> </head> <body> <div id="main"> <div id="wrapper"> <div id="content"> <div id="logo"><br><br></div> <div id="mainnav"><br><br></div> <div id="subnav"><br><br></div> <div id="text"><br><br><br></div> </div> <div id="sidenav">text</div> </div> <div id="footery"> <div id="footer"><br><br></div> </div> </div> </body> </html> http://tonglebeak.com View it in FF, and the floating boxes correctly appear on top of the white div underneath of it. View it in IE, and the floating boxes push the white div below them. How can I get IE to render this the same as FF? Please view the attached image. I want it as; left arrow - gallery - right content all on same line. css Code: #content #gallery { float:left; width:100%; } #content #gallery .list { float:left; border: 1px solid black; background-color: #dfdfdf; } #content #gallery .list li img, #content #gallery .list li p { width: 200px; height: 150px; margin: 10px; } #content #gallery a.galleryprev, #content #gallery a.gallerynext { display: block; float: left; width: 28px; height: 150px; text-decoration: none; background: url("http://www.gmarwaha.com/image/imageNavLeft.gif") left 60px no-repeat; } #content #gallery a.gallerynext { background: url("http://www.gmarwaha.com/image/imageNavRight.gif") right 60px no-repeat; } #content #gallery a.gallerynext:hover { background-image: url("http://www.gmarwaha.com/image/imageNavRightHover.gif"); } #content #gallery a.galleryprev:hover { background-image: url("http://www.gmarwaha.com/image/imageNavLeftHover.gif"); } #content #gallery a:hover, #content #gallery a:active { border: none; outline: none; } html Code: <div id="gallery"> <a href="#" class="galleryprev"> </a> <div class="list"> <ul> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/3.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/4.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/5.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/6.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/7.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/8.jpg" alt="" width="200" height="150" /></li> </ul> </div> <a href="#" class="gallerynext"> </a> </div> Hi All I seem to have an issue with floating an element in IE6&7. All other browsers (including IE8) are fine. When using a right float element, IE7 seems to push the elements to the left of it below the right-floated element, instead of to the left where they are suppose to be. Is there a work-a-round and/or hack for this? Cheers! Russ I use form field hints on my sign up page. I am trying to float it to right with the codes below but its not happening. .hint { float:right; display: none; position:absolute; width: 150px; border: 1px solid #aaaaaa; background: #d7d7d7; } www.pearl.ru/isdunyasi/signup.asp Hi.. I have a problem with ie rendering floaring dd's. What happens is the dd stay next to each other even if i had cleared it. It works fine in FF. Can anyone share some light? ... here is the code... Code: <dl> <dt>Email:</dt> <dd><input type="text" /></dd> <dt>State:</dt> <dd> <select> <option>option1</option> <option>option2</option> <option>option3</option> </select> </dd> <dt>Year of Birth:</dt> <dd> <select> <option>option1</option> <option>option2</option> <option>option3</option> </select> </dd> </dl> and the css: Code: dl{ } dl dt{ clear:both; width:80px; text-align:right; margin:10px 0; } dl dd{ margin:8px 0 0 5px; } dl dt,dl dd{ float:left; } thank you in advance Hi I use DIV to display image thumbnails in a row from php loop. for each div containing image I have set the attribute float: left; so that multiple images can be displayed in parallel. Now the problem is that if I have a single image then there is no need to show it on the extreme left of the page but in the center, but the thumbnail is displayed on the extreme left, here is my code till now, PHP Code: echo "<div style=' text-align: center; border: solid 1px #993333; padding: 1px; margin: 2px; float: left; margin-left: 6%; '>"; echo "<div style=' text-align: center; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;'> <a href='/$path' rel=\"lightbox\"><img src='/print_resize_image.php?image=$path&type=$extension' width=200 height=150 border=0 ></a> </div></div>"; [code] <div id="wrapper" style="background-color:black;padding:2px;overflow:visible;"> <div id="left-floating-box" style="background-color:red;float:left;">asdfsadf</div> <div id="right-floating-box" style="background-color:blue;float:right;">asdfsadf</div> </div> [code] here is a problem, warpper div doesnt strech to the height of the floating divs, ofcourse when you get rid of floating then everything work but i need this to work as it intended and that is two floating boxes with in one div and this div would wrap around two floating boxes and that way background would stretch as well. I rember solving this problem. Long time ago, but for some reason i am stock right now with this problem. Any one can refresh or sugest anything. Thank you. Following on from an earlier thread I've split one problem off into the code below which can also be found at http://alphaworks.co.uk/test/float.htm The problem should be obvious from the text but just to confirm I want the left boundary of the text to be straight and not to flow back under the image as it is currently doing. I can do that with a margin-left:110px on the .description class but I'd rather have a solution which didn't depend on knowing the width of the image as this may well vary. Is there a way to do this? Thanks, Geoff Code: <html> <head> <style type="text/css"> .image { border : solid black 1px; margin : 5px; padding : 5px; float : left; } .description { } </style> </head> <div class="image"> <img src="" width="100" height="100"/> </div> <div class="description"> This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. This should be to the right of the image and should not flow underneath the image. </div> </html> Okay, so here's my code. I need to know how to make the div's go under each other, without neither being side by side, or oddly spaced. Oh, and only Chrome and Safari honor the top: 20%;. I tried putting in a link, but I'm a new user so can't put it in. D: I would like the div's to go below each other, but not sure how to do it. Also, if possible, does anyone know how I could set a determined height? I seem to have the width down. By the way, I'm sort of new to coding, so feel free to school me on how to code it better. Here's the code that I'm using, if you can see my error from the code alone. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/xhtml; charset=windows-1252" /> <meta http-equiv="content-language" content="en-us" /> <title>Test</title> <style type="text/css" media="all"> .navbodyleft { color: #ffffff; background-color: black; font-family:arial; font-size: 20px; position: relative; top:0%; float: right; width: 10%; } .hai { color: #cc0000; background-color: yellow; font-family:arial; font-size: 20px; position: relative; top: 10%; float: right; width: 10%; } </style> </head><body> <div class="hai">hai</div> <div class="navbodyleft">hi</center></div> </body></html> So, in short, I would like to know: how to make the floating divs go under each other how to set a determined height for the floating divs how to make all browsers acknowledge my preset distance from top Thanks guys. My problem is, review section is completely jumbled. I'v attached screen shots of the correct layout taken from another website. Any suggestions would be appreciated. http://www.refinethetaste.com/html/default.asp?Section=product&PRODUCTID=14#fragment-3 Code: #product .raterprofile { float:left; width:200px;} #product .raterprofile .intprofile { font-size: 14px;color: #9e0b0e; font-weight:bold; letter-spacing: -1px;} #product .ratercontent { float:left; width:325px; border-left:1px dotted #ccc;} #product .ratercontent .intrating { font-size: 14px;color: #9e0b0e; font-weight:bold; letter-spacing: -1px;} I want "alternate views" text and thumbimage stand on the same line. I dont understand why the image moves a line below. Please advise. PHP Code: html: #product .productimage .thumb { float:left; width: 250px; border-bottom:1px dotted #ece7d1; } #product img#thumbimage { float:right; width: 16px; height: 16px; border: 0px; } css: <div class="thumb"> alternate views : <img src="http://www.refinethetaste.com/html/THEMES/default/images/pictures.png" id="thumbimage" /> </div> Hi there, I'm having a problem floating an unordered list to the right with IE6. With Firefox it works without problems as usual. I have uploaded on www.emotiona.com/test the failing code. I got it properly displayed when doing the following: - Set the ul tag to float: right; - Set the li and a tags to float: left; Someone knows a rational explanation to the way IE6 behaves? There's a better way to achieve the same result? Besides with the tabs turn from blue to orange in firefox without problems, but with IE6 only the background defined for the tag "a" changes when the mouse is over. I haven't solved this issue yet. Thanks, Caste Hi Guys... i need help.. I have this problem. in Opera, whenever i float something within li, the bullet number disappears.. I want bullet number visible. Can anyone share some light? here is the snipplet Code: <style type="text/css"> li div{float:left;} </style> <ol> <li><div>List Item 1</div></li> </ol> thank you! |