CSS - This Is Driving Me Nuts. Float Problems
http://wrath.wr.funpic.org
Hello Devshed. I am new here and am here looking for help. Maybe I'm just tired and dumb right now to figure it out. Anyways if you would take a look at the site I pointed out you'll notice the bottom border is missing. Why? When I removed the float:left; on the lis it is fine but when it's in there it's all screwed up. Second thing... if you'll notice my hovers do not work in IE. Is there an alternate way for me to get them to work in IE. Thanks a lot. Similar TutorialsTake a look at this page http://www.gameworldx.com/test.html I removed most of the html exept the part giving me problems, but all of the CSS is there. You will see a blue bar(footer) and the white bar (bottom). Both of the links are blue and bold. Why? I have no idea. That is the problem. I noticed that is I remove the CSS for one div or the other, the opposite div shows correctly, but I dont know why it does that. Can anyone see any problems? It's really late, and I am tired, so its gotta be a really stupid mistake. Thanks! Please visit this page - http://www.tmhdesign3.com/real-estate-broker.asp See the gap, about 10px, on the page just below the header? For the life of me I can't get rid of it in FF. I opened Firebug and specified a top:-10px on the content div and it closes the gap. BUT, when I open my css file on the server and chagne that spec and then open the page I still have the gap??? Thanks for any help. If it works in Netscape, it will not work in IE If it works in IE, it will not work in Netscape. Soo, what am I to do? Okay, Im trying to make a table bg have an opacity of 40%. I've gone over the net to figure out the problems, knowing that filter:alpha{} is not recognized by Netscape. So, I found some information to help overcome Netscape woes, and now the opacity isn't work in IE. I need help before I rip all my hair out. So below is what Im working with. Code: <html> <head> <style type="text/css"> #menu { background-color: #FFFFFF; filter: alpha(opacity=40); filter: progid;:DXImageTransform.Microsoft.Alpha(opacity=40); -moz-opacity: 0.40; position:relative; top:0; } .tdbg { background-color: #FFFFFF; filter: Alpha(Opacity=40); } </style> </head> <body> <table width="610" border="0" cellpadding="5" cellspacing="0" bgcolor="#FF0000"> <tr> <td align="center"> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tdbg">FOO</td> </tr> <tr> <td> </td> </tr> <tr> <td><div id="menu">FOO</div></td> </tr> </table></td> </tr> </table> </body> </html> So, basically the top cell is "correct" in IE, but the bottom cel is not. And opposite for Netscape (7.0+) How can i fix it so its the same for both browsers? I bought a php template to put my father website together with. I had worked with html and asp and had thrown together sites quickly in the past, so I didnt think much of it... But php turns out to be a whole new animal I guess, or maybe im missing something simply in the css. I have spent the last 4 hours looking online and asking friends, and I am no closer. I see plenty of forums with footer issues here, but none have given me any clues. Here is the site(im new, i cant post URLs): http://aeroprepare.com You will note that the bottom of the page has a large gray gap, between the footer content and the copywrite area. I simply want to remove this gap, shorten it, so the footer fits closer to the bottom of the page, like the copywrite section does. Sounds simple, but its driving me NUTS. here is my CSS: Code: /*** CSS Resets ***/ html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; }ul {list-style: none;}table { border-collapse: separate; border-spacing: 0;} caption, th, td {text-align: left; font-weight: normal;}blockquote:before, blockquote:after,q:before, q:after {content: "";} blockquote, q {quotes: "" "";} /*** Start Site CSS ***********************************************************/ html, body {height: 100%;} body { font-family: Arial, Helvetica, Verdana, Times New Roman, sans-serif; font-size:12px; background-color:#fff; } #hm_background, #background { min-height: 100%; height: auto !important; height: 100%; margin-bottom:-340px; } #hm_background { background-repeat:repeat-x; background-position:top; } #background { background-repeat:repeat-x; background-position:top; } .clear { clear:both; } .clear-border { margin:15px 0 15px 0; clear:both; border:1px solid #dbdbdb; } #wrapper { margin:0 auto; width:960px; } #logo { float:left; margin:27px 0 0 0; width:284px; height:67px; } #logo_home { float:left; margin:32px 0 0 45px; width:212px; height:52px; } /*** navigation ***************************************************************/ #nav_wrap { position:relative; margin:25px 0 0 460px; padding:12px 0 0 15px; background-repeat:no-repeat; width:464px; height:52px; z-index:99; } #nav { list-style-type:none; margin:0; padding:0; } #nav li { float:left; margin:0; padding:0; } #nav li a { position: relative; float: left; margin: 0 11px 0 0; padding: 0 17px 0 0; height: 37px; text-decoration: none; color: #fff; font-size:12px; z-index: 2; } #nav li a span { display: block; line-height: 21px; padding: 3px 0 5px 20px; color: #fff; } #nav_hover { position: absolute; float: left; margin: 0 11px 0 0; padding: 0 17px 0 0; height: 28px; z-index: 1; } #nav_hover span { display: block; padding: 3px 0 5px 20px; line-height: 21px; height: 28px; z-index: 1; } /*** Dropdown ***/ #nav ul { position:absolute; display:none; padding:0 0 12px 0; width:142px; top:48px; list-style-type:none; z-index:99; } #nav li ul li { margin:0; padding:0; } #nav li ul a, #nav li ul a:visited { float:left; padding:4px 0 0 12px; width:130px; height:20px; font-weight:normal; } #nav ul ul{ top:auto; } #nav li ul ul { left:142px; margin:0; } #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul{ display:none; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul{ display:block; } /*** footer *******************************************************************/ #footer_wrap, .push { height: 360px; clear: both; } #footer_wrap { background-color:#e5e5e5; /*e5e5e5*/ border-top:1px solid #B3BCBF; } #footer { margin:0 auto; padding:12px 0 0 40px; width:920px; } #footer a { text-decoration:none; } .foot_clm_block { float:left; margin:25px 15px 15px 0; width:165px; } .foot_clm_heading { margin:0 0 5px 0; font-size:14px; text-transform:uppercase; color:#fff; } .foot_clm_block ul { margin:0; padding:0; list-style-type:none; } .foot_clm_block ul li { color:#7F7F7F; } .foot_clm_block ul li a { display:block; padding:5px 0 0 5px; height:20px; color:#fff; border-bottom:1px solid #CDCDCF; font-size:12px; } .foot_clm_block ul li a:hover { color:#4E4E4E; } #search_form_footer { margin:5px 0 10px 1px; height:24px; border:1px solid #fff; background-color:#fff; } #search_footer { float:left; padding:3px; width:120px; border:none; } #social_icons { margin:5px 0 0 6px; } #social_icons a { margin:0 4px 0 0; } #copyright_wrap { border-top:1px solid #f1f1f1; height:40px; } #copyright_txt { margin:0 auto; margin-top:10px; width:880px; color:#fff; font-size:11px; } #copyright_txt a { color:#fff; font-size:11px; } /*** home page ****************************************************************/ #hm_header { height:139px; background-repeat:no-repeat; background-position:top center; padding-top: 1px; padding-bottom: 1px; } #slider { margin:0 0 0 23px; padding:10px 0 0 33px; background-repeat:no-repeat; width:881px; height:298px; } #slider_imgs img { display:none; } #news { margin:15px 0 10px 25px; background-image:url(../images/news_back.jpg); background-repeat:no-repeat; width:911px; height:65px; overflow:auto; /* fixes margin collapsing */ } #news_icon { float:left; margin:17px 0 0 17px; background-image:url(../images/airplaneminilogo.png); background-repeat:no-repeat; width:55px; height:41px; } #news_text { margin:20px 0 0 15px; float:left; font-size:20px; text-align:left; width:800px; } #news_text ul { margin:0; padding:0; list-style-type:none; } #news_text a { text-decoration:none; } #three_columns { margin:0 0 0 25px; background-image:url(../images/3column_back.jpg); background-repeat:no-repeat; width:910px; } .three_clm_block { float:left; margin:25px 0 45px 0; padding:0 25px; width:250px; height:200px; background-image:url(../images/3column_border.jpg); background-repeat:no-repeat; background-position:top left; } .three_clm_circle { float:left; padding:6px 0 0 0; width:32px; height:26px; background-repeat:no-repeat; background-position:top left; color:#fff; text-align:center; font-size:16px; font-weight:bold; } .three_clm_title a { float:left; padding:5px 0 0 8px; font-size:20px; text-decoration:none; } .three_clm_text { padding-top:7px; clear:both; line-height:19px; } /*** portfolio ****************************************************************/ #port_title h1 { margin:15px 0; font-size:34px; font-weight:normal; } #port_wrap { padding:32px 0 0 0; } .port_block { float:left; margin:0 22px 22px 0; padding:7px; background-color:#d6d9da; border:1px solid #a7a9a9; width:426px; height:346px; } .port_img { position: relative; border:1px solid #fff; background-color:#fff; width:425px; height:324px; } .port_txt { position: absolute; top: 110px; left: 0; padding:2px 0 0 10px; width:240px; height:18px; background-color:#fff; } .port_mag_img { position: absolute; top: 10px; left: 81px; } .port_txt a { font-weight:bold; text-decoration:none; } .port_img img { border:none; } /*** blog / static page *******************************************************/ #header { height:139px; background-repeat:no-repeat; background-position:top center; padding-top: 1px; padding-bottom: 1px; } #breadcrumb { padding:15px 0 0 0; height:25px; color:#fff; font-weight:bold; } #breadcrumb a { color:#fff; font-weight:bold; text-decoration:none; } /*** sidebar ***/ #sidebar { float:left; margin:25px 0 0 0; width:220px; } .sidebar_block { margin:0 0 35px 0; } .sidebar_heading { font-size:18px; border-bottom:5px solid #d6d9da; color:#23353e; } #sidebar ul { margin:0; padding:0; list-style-type:none; } #sidebar ul li a { display:block; padding:4px 0 0 30px; height:21px; border-bottom:1px solid #d6d9da; text-decoration:none; color:#B3BCBF; background-image:url(../images/bullet_arrow.jpg); background-repeat:no-repeat; } #sidebar ul li ul li a { padding:4px 0 0 54px; background-image:url(../images/bullet_arrow_sub.jpg); background-repeat:no-repeat; } #sidebar a:hover { color:#959D9F; } #search_form { margin:5px 0 0 1px; width:216px; height:24px; border:1px solid #d6d9da; background-color:#fff; } #search { float:left; padding:3px; width:180px; border:none; } .search_btn { float:right; margin:1px 0 0 0; background-image:url(../images/search_icon.jpg); background-repeat:no-repeat; background-position:center; border:none; background-color:transparent; cursor:pointer; width:25px; height:22px; } /*** content ***/ #content { float:left; margin:25px 0 0 55px; width:645px; } #contentblog { float:left; margin:25px 0 0 55px; width:100%; } #content_full { float:left; margin:25px 0 0 0; } .post_block { margin: 0 0 20px 0; padding: 0 0 20px 0; border-bottom:1px solid #d6d9da; } #page_block { margin: 0 0 20px 0; padding: 0 0 20px 0; } #page_title h1 { margin:0 0 5px 0; padding:0; font-size:34px; font-weight:normal; } #content h1 a { font-size:34px; font-weight:normal; } .post_meta { height:20px; font-weight:bold; color:#929393; } .post_meta a { text-decoration:none; font-weight:bold; color:#929393; } .post_img { padding:7px 0; margin:10px 0; border-top:1px solid #d6d9da; border-bottom:1px solid #d6d9da; } .post_txt { line-height:20px; color:#23353e; } .post_txt img { padding:3px; border:1px solid #b3b3b3; } .onethird { padding: 0 0 0 15px; float:left; width:30%; } .onehalf { padding: 0 0 0 15px; float:left; width:47%; } .twothirds { padding: 0 0 0 15px; float:left; width:64%; } .post_readmore { margin:5px 0 0 0; } .post_readmore a { text-decoration:none; font-weight:bold; color:#23353e; } #pagination { margin:15px 0; height:32px; } #pagination ul { margin:0; padding:0; list-style-type:none; } #pagination ul li { float:left;} #pagination ul li a { float:left; margin:0 5px 0 0; padding:8px 0; width:31px; height:23px; color:#fff; text-decoration:none; text-align:center; font-weight:bold; background-image:url(../images/pagination.jpg); background-repeat:no-repeat; } #pagination ul li a.active, #pagination ul li a:hover { background-image:url(../images/pagination_active.jpg); background-repeat:no-repeat; } /*** comments *****************************************************************/ #comments { margin:0 0 40px 0; } .comm_block { padding:25px 0 25px 0; border-bottom:1px solid #e7e7e7; } .comm_avatar { float:left; padding:3px; width:50px; height:50px; background-color:#fff; border:1px solid #e7e7e7; } .comm_meta { float:left; margin: 0 0 0 20px; width:550px; } .comm_author { font-size:16px; } .comm_text { float:left; margin: 0 0 0 20px; width:564px; line-height:18px; } .comm_even { background-color:#fff; } #comm_form { margin:20px 0; } /*** contact ******************************************************************/ #contact_txt {} #google_map { margin:5px 0; border:1px solid #b3b3b3; } #contact_form { margin:20px 0; } .err { color:#BF2323; } /*** forms ********************************************************************/ .form_tb { padding:3px; width:400px; height:18px; border:1px solid #b3b3b3; color:#254A59; } .form_ta { padding:3px; width:639px; height:150px; border:1px solid #b3b3b3; font-family:Arial, Helvetica, Verdana, sans-serif; font-size:12px; color:#254A59; } .form_btn { padding:5px 7px; font-family:Arial, Helvetica, Verdana, sans-serif; font-size:12px; color:#fff; border:none; background-color:#fff; cursor:pointer; background-repeat:no-repeat; width:114px; height:33px; } /*** global *******************************************************************/ ul { padding:0 0 0 30px; list-style-type:square; } ol { padding:0 0 0 30px; } a { color:#03181F; } p { margin:0 0 10px 0; } h1 { margin:0 0 15px 0; font-size:34px; font-weight:normal; } h1 a { text-decoration:none; } h2 { margin:0 0 7px 0; font-size:24px; font-weight:normal; } h3 { margin:0 0 5px 0; font-size:18px; font-weight:normal; } h4 { margin:0 0 5px 0; font-size:16px; font-weight:bold; } h5 { margin:0 0 3px 0; font-size:14px; font-weight:bold; } blockquote { margin:20px 0 20px 30px; padding:0 10px; border-left:5px solid #dbdbdb; } strong { font-weight:bold; } .hidden { display:none; } .noborder { border:none; } .noimage { background-image:none; } .aligncenter, div.aligncenter { display: block; margin-left: auto; margin-right: auto; } .alignleft { float: left; } .alignright { float: right; } view page source to see the home page. I dont have the footer in an incorrect div (that i can see) Please can someone far smarter than me see whats going on here. I have taken the footer apart, edited the style sheet a 100 different gut-shot ways, tried to recreate the page, ripped apart the wrapper and other sections... If I touch the height on the footer push, the whole footer moves to the center of the page... If I try to move around it, I get dead space between the end of the text and the beginning of the footer.... PLEASE someone show me what im missing, ive lost hair over this, and my laptop is about to find out if its impact resistant. Hey, so I am a beginner in css and I can't seem to figure out this problem. I am trying to get a td to float: left, and it works just fine on firefox, but IE7 is not showing the float. Here is the code I have for it /* Style for Entries in Category View (Cards View) */ /* -------------------------------------------------------- */ table.sobi2Listing { } table.sobi2Listing td { vertical-align: top; float: left; height: 1%; width: 97%; } /* new */ div.vcard_item { margin: 1px 0px 2px 0; padding: 6px; width: 97%; border:1px solid #dddddd; background-color:#fbfaf2; -moz-border-radius: 5px; The actual page is findawebsitedesigner.info/directory-2.html If you look at the entries, they are all floated perfectly in firefox, but not in IE7. If anybody has the fix to this I would love your help. I feel like I am going backwards instead of forward. I have made many changes to the layout trying to achieve what I want I had something close, but it was for a fixed height for the main page layout box and I needed something that will be a min height of 600px but will stretch if the content exceeds that. So now after reading many tutorials on boxes, blocks, layouts, floats, etc. I am actually further from acheiving my goal (I think). I feel like I am losing my mind trying to figure it out I have made each major box a different color for purposes only of trying to get the layout right and figuring out what each element is actually doing - so ignore all the funky colors. I tried using a background image to create a faux side column (hot pink border) that I hoped would do the trick - however, I can't even get it to show up. I realize there has got to be something I am over looking - but what??? I tried using the css toolbar helper - the bg image is outlined but not showing up?? There are no broken images either ??? Click here to see the page So here is my css: Code: /*Main Section two columns under top section*/ #wrapper{ width: 100%; min-height: 100%; background-color: #660099; padding-top: 10px; position: relative; } #sideColumn { float:left; width:155px; height: 100%; background: url(images/blue.gif) repeat-y; border: 1px solid #FF00FF; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; margin-right: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sideColumn a:link, #sideColumn a:visited { background-color: transparent; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; margin-left: 175px; background-color: #99FF00; } Here is my xhtml: Code: <body> <!--begin page --> <div id="page"> <!--begin header --> <div id="header"><img src="images/vitalograph_spirometers_logo.gif" width="230" height="36" alt="vitalograph spirometers logo" /> <span class="tagline">world leaders in spirometry</span> </div> <!--end of header --> <!--begin topbar --> <div id="topbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="about_us/about_us.html">About Us</a></li> <li><a href="other_regions.html">Other Regions</a></li> </ul> </div> <!--end topbar --> <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <span class="category">Products</span> <ul> <li><a href="products/spirometers.html">Spirometers</a></li> <li><a href="products/clinical_trials.html">Clinical Trials</a></li> <li><a href="products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="resources/customer_support.html">Customer Support</a></li> <li><a href="resources/training_services.html">Training & Services</a></li> <li><a href="resources/exhibitions.html">Exhibitions</a></li> <li><a href="resources/newsletters.html">Newsletters</a></li> <li><a href="resources/downloads.html">Downloads</a></li> <li><a href="resources/useful_links.html">Useful Links</a></li> <li><a href="resources/industry_information.html">Industry Information</a></li> <li><a href="resources/industry_information.html">Sitemap</a></li> </ul> </div> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- InstanceBeginEditable name="Main_Section" --> <div id="home"> <div id="scroll"><span> <img src="/images/boys_bubbles.gif" width="485" height="333" alt="boys and bubbles" /> <span class="large">Welcome to Vitalograph</span> <p class="home">Vitalgraph offers a wide range of spirometers along with other asthma management equipment with over 40 years experience. From simple hand-held units to sophisticated Windows based spirometry systems, we have it all. Check out our full line of respiratory equipment under the product category.</p> <p class="home"><a href="/about_us/about_us.html">more about us...</a></p> </div> <!-- InstanceEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> </div> <!--end of white border --> </div> <!--end of page --> </body> Hi everyone! I've been struggling with a few problems with a new site I have just developed in HTML5 and CSS3... These problems only occur in IE8 (and compatibility mode of)...I have IE9 installed and I can't reproduce any of the problems when I use compatibilty mode, however when I use IE Tester I can view the issues...which are.... 1. When I click on a link in the footer or in the top of the header (home/contact) they are assigned 'visited' class but this makes them higher than the other links in the list... could this be anything to do with the 'nav' styling? 2. I can't produce bottom borders in the sub menus of the main navigation - I have tried removing padding, setting relative/absolute positioning and z-index values as has been suggested in other resources and nothing works!!! If anyone can give me any help at all...or if you need any further information or access to my style sheets etc please let me know - I will really appreciate it! Thanks in advance...Rachel 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! 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! 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 ) 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. hey all, i have divs within a div but the inner div with the text does not expand the main wrapping div with so the main wrapping div is very thin and the text just goes over it?? here is the code Code: <div id="greyinset"> <div id="insetcontent"> <form name="form1" method="post" action=""> <div id="insetcontentL"> <div align="left"> <label>Smoking:</label> <br> <label>Bed Type:</label> <br> <label>Accessible:</label> <br> </div> </div> <div id="insetcontentR"> <div align="left"> <input name="smoking" type="radio" value="yes"> yes <input name="smoking" type="radio" value="no" checked> no<br> <input name="radiobutton" type="radio" value="radiobutton"> King <input name="radiobutton" type="radio" value="radiobutton"> Two Beds <input name="radiobutton" type="radio" value="radiobutton"> No Preference<br> <input name="accessible" type="checkbox" id="accessible" value="yes"> </div> </div> </form> </div> </div> and the css code Code: #greyinset { width: 100%; background-color: #eee; border: 1px solid black; clear:left; } #insetcontent {width: 100%; padding: 3px 10px 3px 10px; white-space:normal;} #insetcontentL {width: 50%; float: left;} #insetcontentR {width: 50%; float: right;} any ideas?? or do i have to go back to trusty tables thanks RF Hey guys, I started working on my website again and found a great CSS dropdown menu online that is free to use with a GPL license. I adjusted it without a problem (always could read and adjust code but aren't great when it comes to writing it). Now that I embedded it in my website there is a slight trouble I am running into. I can't seem to center it no matter what I try. I read these floats are tricky to center at times which is why I wanted to share my code with you and see if you might be able to fix it for me. If anyone of you can help me out it would be much appreciated!!! Thanks, alex Here is the site with the code. 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> <title>LWIS.NET Celebrity Drop-Down Menu</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="Tom@Lwis (http://www.lwis.net/free-css-drop-down-menu/)" /> <meta name="keywords" content=" css, dropdowns, dropdown menu, drop-down, menu, navigation, nav, horizontal, vertical left-to-right, vertical right-to-left, horizontal linear, horizontal upwards, cross browser, internet explorer, ie, firefox, safari, opera, browser, lwis" /> <meta name="description" content="Clean, standards-friendly, modular framework for dropdown menus" /> <link href="css/dropdown/themes/lwis.celebrity/helper.css" media="screen" rel="stylesheet" type="text/css" /> <!-- Beginning of compulsory code below --> <link href="css/dropdown/dropdown.linear.columnar.css" media="screen" rel="stylesheet" type="text/css" /> <link href="css/dropdown/themes/lwis.celebrity/default.advanced.css" media="screen" rel="stylesheet" type="text/css" /> <!--[if lte IE 7]> <script type="text/javascript" src="js/jquery/jquery.js"></script> <script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script> <![endif]--> <!-- / END --> </head> <body> <!-- Beginning of compulsory code below --> <ul id="nav" class="dropdown dropdown-linear dropdown-columnar"> <li><a href="./">resume</a></li> <li><a href="./">about</a></li> <li class="dir">work <ul> <li class="dir">Reel <ul> <li><a href="./">Montage Reel</a></li> <li><a href="./">Director's Reel <br>(selected scenes)</a></li> </ul> </li> <li class="dir">Narrative <ul> <li><a href="./">The Liberation of the Fish</a></li> <li><a href="./">Behind the Scene</a></li> <li><a href="./">All that Remains</a></li> <li><a href="./">Jumper</a></li> <li><a href="./">Dragoste</a></li> </ul> </li> <li class="dir">Music Video <ul> <li><a href="./">MOBY music video competition</a></li> </ul> </li> <li class="dir">Commercial <ul> <li><a href="./">FIFA spec commercial</a></li> </ul> </li> </ul> </li> </ul> <!-- / END --> </body> </html> And here is the default css which I have tried playing with to no success. Code: @charset "UTF-8"; /** * LWIS Celebrity CSS Drop-Down Menu Theme * * @file default.css * @name Default * @version 0.1 * @type transitional * @browsers Windows: IE5+, Opera9+, Firefox2+ * Mac OS: Safari2+, Firefox2+ * * @link http://www.lwis.net/ * @copyright 2009 Live Web Institute. All Rights Reserved. * */ /*-------------------------------------------------/ * @section Base Drop-Down Styling */ ul.dropdown { font: 20px/normal Helvetica, Arial, sans-serif; letter-spacing: +2px; text-transform: lowercaseercase; } ul.dropdown li { padding: 0 10px; background-color: transparent; color: #000; } ul.dropdown li.last ul li { float: right; } ul.dropdown li.hover, ul.dropdown li:hover { background-color: #cdcdcd; color: #000; } ul.dropdown a:link, ul.dropdown a:visited { color: #000; text-decoration: none; } ul.dropdown a:hover { color: #000; } ul.dropdown a:active { color: #ffa500; } /* -- level mark -- */ ul.dropdown ul { background-color: #cdcdcd; font-size: 12px; letter-spacing: normal; } * html ul.dropdown ul { width: 960px; } ul.dropdown ul li { font-weight: bold; } /* -- level mark -- */ ul.dropdown ul ul { margin-top: 5px; text-transform: none; } ul.dropdown ul ul li { font-weight: normal; } /*-------------------------------------------------/ * @section Support Class `dir` */ ul.dropdown *.dir { padding-right: 30px; background-image: url(../../../../images/lwis.celebrity/nav-arrow-down.png); background-position: 100% 50%; background-repeat: no-repeat; } ul.dropdown ul *.dir { background-image: none; } I have an image that is float: right that I want a caption under. I read the Floatutorial and another float tuturial and thought I did what it said, but now the image floats left of the caption - sort of. I want the image to float left and the caption in dk blue to be beneath it. Here is the problem page Here is the css code for the float part: Code: .imgRight { clear: none; float: right; min-width: 100px; color: #3399FF; font-weight: bold; } .imgRight img { margin: 0px 0px 10px 20px; border: 1px solid #000099; overflow: visible; } Here is the xhtml code for the float part: Code: <p>Vitalograph Ltd was founded in 1963, building on a successful business in respiratory diagnostic and therapeutic products started in 1951. </p> <div class="imgRight"><img src="../images/p_model.jpg" width="275" height="182" alt="Vitalograph P Model Spirometer" /> 1966 Vitalograph P Model Spirometer</div> <p>Vitalograph achieved its early success by taking spirometry from a complex laboratory test to a simple effective screening procedure - with the key benefit of providing early detection, and therefore more effective treatment.</p> Thanks for viewing my post. Here is the site I am working with: http://www.flattrackillustrated.com/dev/ I am having two problems: 1) If you shrink your browser too far in on the left, the floating right image goes over everything. I need to MAX left side margin to be about 600px, but with float on, the margin-left doesn't work! Is there a way to tell this image to float, but stop at a certain point? 2) I want the background image I have on the left nav side to continue all the way to the bottom of the page, however, since I already am using a background image for the top, I can't seem to do a horizontal and vertical of two different images. Is there a way to make this happen? Thanks! Hello. I am trying to solve a float problem. The crux: One wrapper div around a left (floated) column and right column. Content in the left is fine: In the right column I need the image (#logo) to be on the left of a h2 (#name). The #logo is taller than #name. Under both of those I need a ul (#basic_list) to essentially clear both #logo and #name. Please look at my code and diagram of how it should look in my attachment. Thanks 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. Here is the industry news page I have the picture floating either right or left with text beside it - then a line underneath it. I want the line to always be at least 10px below the picture. When the text is less, the line crosses into the picture. xhtml: Code: <div id="industry"> <h1>Industry News and Information</h1> <div class="row"> <span class="imgLeft"><img src="../images/ATS-ERS_thumb.jpg" width="100" height="100" alt="ERS ATS Logo" /></span> <h2>New single set of standards for ERS and ATS</h2> <p>Through the combined efforts of the European Respiratory Society (ERS) and the American Thoracic Society (ATS), there is now a new single set of standards for both sides of the Atlantic. <a href="/resources/industry_news/news_ers_ats.html">More ...</a></p> </div> <div class="row"> <span class="imgRight"><img src="../images/ARTP_thumb.jpg" width="112" height="100" alt="COPD Day at Vitalograph" /></span> <h2>Winter ARTP meeting well attended</h2> <p>Vitalograph recently attended the Association for Respiratory Technology and Physiology (ARTP) 3Oth Annual Conference at the Hilton Metropole Hotel in Brighton. <a href="/resources/industry_news/news_artp.html">More ...</a></p> </div> <div class="row"> <span class="imgLeft"><img src="../images/ATS-ERS_thumb.jpg" width="100" height="100" alt="ERS ATS Logo" /></span> <h2>New single set of standards for ERS and ATS</h2> <p>Through the combined efforts of the European Respiratory Society (ERS) and the American Thoracic Society (ATS), there is now a new single set of standards for both sides of the Atlantic. <a href="/resources/industry_news/news_ers_ats.html">More ...</a></p> </div> <div class="rowLast"> <span class="imgRight"><img src="../images/COPDdayoffice_thumb.jpg" width="99" height="98" alt="COPD Day at Vitalograph" /></span> <h2>Vitalograph participates World COPD Day</h2> <p>To mark World COPD Day on 16 November 2005, the British Lung Foundation teamed up with Superdrug to offer a free spirometry test at selected stores across the UK. <a href="/resources/industry_news/news_world_copd_day.html">More ...</a></p> </div> <p class="back"><a href="javascript:history.go(-1)">< Back</a></p> </div> css: Code: .imgLeft img { clear: none; float: left; margin: 0px 20px 10px 0px; border: 1px solid #000099; } .imgRight img { clear: none; float: right; margin: 0px 10px 10px 20px; border: 1px solid #000099; } /*rows*/ .row { padding-top: 10px; margin-top: 10px; border-top: 1px solid #3399FF; } .rowLast { padding-top: 10px; padding-bottom: 10px; margin-top: 10px; margin-bottom: 10px; border-top: 1px solid #3399FF; border-bottom: 1px solid #3399FF; } .line { border-bottom: 1px solid #3399FF; padding-top: 0px; padding-bottom: 10px; } .inline { display: inline; } #mainColumn { padding: 0px; margin-left: 175px; background-color: #FFFFFF; height: 100%; } /*industry news*/ #industry { padding-right: 20px; padding-left: 20px; } #industry h1 { margin-bottom: 20px; } #industry h2 { color: #000099; margin: 0px 0px 10px 0px; } #industry img { margin-bottom: 10px; } .copdDay img { clear: both; margin: 0px 40px 15px 55px; border: 1px solid #000099; } .artp { margin: 0px 40px 15px 40px; } .artp img { clear: both; margin: 0px 40px 15px 25px; border: 1px solid #000099; } Any suggestions on how to get this consistently since through css accounting for varying lengths of text?? I know I can adjust padding/margins for each section to make it work, but I want something that is more universal that I can always use to get the same appearance. Thanks! 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. |