CSS - Right Column Being Funky
I have never been really good at css. It's just not my cup of tea. I'm having a problem with my right-box div.
It is not lining up with the left and middle div. heres my code: index.html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/index.css" /> <title>Vida La Viva Expo</title> </head> <body> <div id="container"> <div id="header"> English | Espanol </div> <div id="content"> <div id="left-box"> </div> <div id="middle-small"> <h2>Want to get your business known?<br /> Want to help others?</h2> <H1>Join The Expo Today!</H1> </div> <div id="right-box"> </div> </div> </div> </body> </html> index.css Code: body, html { margin:0; padding:0; } body { background-color:#23bbe1; } #container { margin-left:auto; margin-right:auto; background-color:black; width:1108px; height:1064px; } #header { text-align:right; font-family:verdana; color:white; margin-left:auto; margin-right:auto; width:1087px; height:168px; background-image:url(images/header.gif); } #content { width:1087px; height:905px; background-color:white; margin-left:auto; margin-right:auto; padding-top:10px; } #middle-small { width:640px; height:189px; margin-left:auto; margin-right:auto; background-image:url(images/middle-small.png); background-repeat:no-repeat; padding-top:10px; text-align:center; font-family:verdana; color:white; } #middle-small h2{ color:white; } #middle-small h1{ color:red; } #left-box{ float:left; clear:none; width:170px; height:337px; margin-left:10px; background-color:#75de12; } #right-box{ float:right; width:170px; height:337px; margin-right:10px; background-color:#75de12; } Heres an image of how its turning out: http://img523.imageshack.us/img523/9456/cssproblem.jpg Thanks in advance, any help is greatly apprieciated. Similar TutorialsI created a dynamic menu with css. It looks great in firefox and IE, but it seems that when users are using safari, the dividers on the menu get screwed up. Is there a hack that can fix this? Is it hopeless? The site is here and the css is here Thanks Look at this in both IE and Firefox: www.sandlotillustrated.com In IE, there's a 2 pixel bar floating underneath the nav buttons. In Firefox it's not there. Any idea what's going on? I've debugged the heck out of it and can't see the problem. Any help would be greatly appreciated! I would first like to say that I'm a noob to PHP. The problem that I am having is with my picture viewer. When you click on the thumbs, they show above in the main image viewer. The problem is that it is displaying the thumbnail instead of resizing the original image to fit the main image spot. When you click on the main image, the original pic is to be displayed in a lightbox. How do I go about fixing this issue? Thanks in advance for those who help! Code: http://conceptsinmotion.net/store/store?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=17 PHP Code: <?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?> <?php echo $buttons_header // The PDF, Email and Print buttons ?> <?php if( $this->get_cfg( 'showPathway' )) { echo "<div class=\"pathway\">$navigation_pathway</div>"; } if( $this->get_cfg( 'product_navigation', 1 )) { if( !empty( $previous_product )) { echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>'; } if( !empty( $next_product )) { echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>'; } } ?> <br style="clear:both;" /><center> <table border="0" style="width: 100%;margin-left: auto;margin-right: auto;"> <tbody> <tr align="right"> <td colspan="3" align="center"> <?php if( $this->get_cfg('showManufacturerLink') ) { $rowspan = 5; } else { $rowspan = 4; } ?> <div id="parent_img"><?php echo $product_image ?></div> <br/><br/> <?php if (count($images)): foreach ($images as $image){$curentwidth += $image->file_image_thumb_width;}?> <script type="text/javascript"> iens6=document.all||document.getElementById ns4=document.layers var speed=5 </script> <div id="scroll" style="margin-left: auto;margin-right: auto;"> <div class="box-left" style="width: 15px; float: left;margin:10px 0px 0px 0px"><a class="mouseover_left" onmouseover="movedown()" onmouseout="clearTimeout(movedownvar)" href="#"><img src="<?php echo JURI::root().'components/com_virtuemart/themes/vm_black/images/prev.png';?>" alt="" border="0" /></a></div> <span class="box-right" style="float: right;margin:10px 0px 0px 0px"><a class="mouseover_right" onmouseover="moveup()" onmouseout="clearTimeout(moveupvar)" href="#"><img src="<?php echo JURI::root().'components/com_virtuemart/themes/vm_black/images/next.png';?>" alt="" border="0" /></a></span> <div id="container" style="overflow: hidden; width: 50%; position: relative; height: 55px;float:center"> <div id="child" style="position: absolute; width: <?php echo $curentwidth;?>px; left: 0pt; top: 0pt;"> <ilayer name="nscontainer"> <layer name="nscontent" visibility="hidden"> <?php echo $this->vmlistAdditionalImages( $product_id, $images )?> </layer> </ilayer> </div> </div> <div class="box-right" style="float: right;margin:10px 0px 0px 0px"></div> </div> <script language="JavaScript1.2"> if (iens6){ var crossobj=document.getElementById? document.getElementById("child") : document.all.content var contentheight=crossobj.offsetWidth } else if (ns4){ var crossobj=document.nscontainer.document.nscontent var contentheight=crossobj.clip.width } function movedown(){ if (iens6&&parseInt(crossobj.style.left)>=<?php echo 64*count($images)*(-1)/5-32;?>) crossobj.style.left=parseInt(crossobj.style.left)-speed+"px" else if (ns4&&crossobj.left>=<?php echo 64*count($images)*(-1)/5-32;?>) crossobj.left-=speed movedownvar=setTimeout("movedown()",50) } function moveup(){ if (iens6&&parseInt(crossobj.style.left)<=0) crossobj.style.left=parseInt(crossobj.style.left)+speed+"px" else if (ns4&&crossobj.left<=0) crossobj.left+=speed moveupvar=setTimeout("moveup()",50) } function getcontent_height(){ if (iens6) contentheight=crossobj.offsetWidth else if (ns4) document.nscontainer.document.nscontent.visibility="show" } window.onload=getcontent_height </script> </td> <style type="text/css"> ul.box li{float:left;list-style:none;padding-left:0 !important} ul.box{width:100%;margin:0px;padding:0px;} li:hover img{opacity:1} </style> <script type="text/javascript"> function show_img(url) { var output1 = window.document.getElementById('curent').href=url; var output2 = window.document.getElementById('img_preview').src=url; return true; } </script> <?php endif;?><br /><br /> </tr> <tr align="right"> <td rowspan="1" colspan="3" align="right"> <h1 style="margin-left: auto;margin-right: auto;"><?php echo $product_name ?> <?php echo $edit_link ?></h1> </td> </tr> <?php if( $this->get_cfg('showManufacturerLink')) { ?> <tr align="center"> <td rowspan="1" colspan="3"><?php echo $manufacturer_link ?><br /></td> </tr> <tr align="center"> <td colspan="3"> </td> </tr> <?php } ?> <tr align="right"> <td colspan="3" align="center" valign="top"> <?php echo $product_price_lbl ?> <?php echo $product_price ?><br /></td> </tr> <tr align="right"> <td colspan="3" align="center" valign="top"><?php echo $product_packaging ?><br /></td> </tr> <tr align="center"> <td colspan="3"><?php echo $ask_seller ?></td> </tr> <tr id="browseProductDescription"> <td colspan="3" rowspan="1" align="center"><hr /> <?php echo $product_description ?><br/> <span style="font-style: italic;"><?php echo $file_list ?></span> </td> </tr> <tr align="left"> <td width="16%" align="left"><?php if( $this->get_cfg( 'showAvailability' )) { echo $product_availability; } ?><br /> </td> <td width="17%" align="right"><?php echo $addtocart ?></td> </tr> <tr align="center"> <td colspan="4"><?php echo $product_type ?></td> </tr> <tr align="center"> <td colspan="4"><hr /><?php echo $product_reviews ?></td> </tr> <tr align="center"> <td colspan="4"><?php echo $product_reviewform ?><br /></td> </tr> <tr align="center"> <td colspan="4"><?php echo $related_products ?><br /> </td> </tr> <?php if( $this->get_cfg('showVendorLink')) { ?> <tr align="center"> <td colspan="4"><div style="text-align: center;"><?php echo $vendor_link ?><br /></div><br /></td> </tr> <?php } ?> </tbody> </table></center> <?php if( !empty( $recent_products )) { ?> <div class="vmRecent"> <?php echo $recent_products; ?> </div> <?php } if( !empty( $navigation_childlist )) { ?> <?php echo $VM_LANG->_('PHPSHOP_MORE_CATEGORIES') ?><br /> <?php echo $navigation_childlist ?><br style="clear:both"/> <?php } ?> Code: /** * Main CSS file for the "black color" theme for VirtueMart * @copyright 2006-2008 soeren * @colortheme (C) 2008 gtwillemsen - surpass.nl * @license GNU/GPL * */ /* General Shop Styles here please */ .addtocart_button, .notify_button { text-align:center; background-position:bottom left; width:160px;height:30px; cursor:pointer; border: none; font-weight:bold; font-family:inherit; color: #ffffff; vertical-align: middle; overflow:hidden; } .addtocart_button { background: url( 'images/add-to-cart.png' ) no-repeat center transparent; } .notify_button { background: url( 'images/notify.png' ) no-repeat center transparent; } .addtocart_button_module { text-align:center; background-position:bottom left; width:160px;height:30px; cursor:pointer; color: #ffffff; border: none; font-weight:bold; font-family:inherit; background: url( 'images/transparent.png' ) no-repeat center transparent; vertical-align: middle; overflow:hidden; } input.addtocart_button_module:hover { color: #333333; } .addtocart_form { width: 100%; display: inline; white-space: nowrap; } /* The quantity box beneath the "add to cart" button */ .quantity_box { vertical-align: middle; } .quantity_box_button { width:10px; vertical-align:middle; height:10px; background-repeat: no-repeat; background-position: center; } .quantity_box_button_down { background-image: url(images/down_small.png); } .quantity_box_button_up { background-image: url(images/up_small.png); } .continue_link, .checkout_link { margin: 2px; padding: 2px 0px 2px 40px; vertical-align: middle; font-weight: bold; font-size: 1.4em; width: 40%; } .checkout_link { margin-left: 40px; background: url( 'images/forward.png' ) no-repeat left; } .continue_link { background: url( 'images/back.png' ) no-repeat left; } .next_page { background: url( 'images/next_16x16.png' ) no-repeat right; padding-right: 30px; line-height: 20px; float: right; width: auto; } .previous_page { background: url( 'images/previous_16x16.png' ) no-repeat left; padding-left: 30px; line-height: 20px; float: left; width: auto; } /* This is the text box informing customers about your returns policy */ .legalinfo { background: #cccccc; border: 2px solid gray; margin: 10px; padding: 0px 0px 10px 10px; } div.pathway { margin-bottom: 1em; } div.pathway img { padding: 0 2px; } /* The PDF, Email and Print buttons */ div.buttons_heading { margin:10px; width:10%; float:right; } .productPrice { font-weight:bold; white-space: nowrap; } .product-Old-Price { color:red; text-decoration:line-through; } /** BROWSE PRODUCTS STYLES **/ .browseProductContainer { width:100%; padding: 3px 3px 3px 3px; vertical-align: top; } .browseProductTitle { font-size: 16px; font-weight: bold; padding: 3px; margin-top: 3px; width: 30%; float: left; } .browseProductImageContainer { float: left; width: auto; margin: 3px; } .browseProductImageContainer { margin: 3px; float: left; height:130px; width:120px; } .browseProductDetailsContainer { float: left; width: 70%; } .browseProductDescription { margin-top: 40px; width:40%; } .browsePriceContainer { float: left; margin: 5px; width:20%; } .browseAddToCartContainer { width:30%; text-align:center } .browseRatingContainer { float: left; width:25%; margin: 3px; white-space: nowrap; } /** Flypage Styles **/ .thumbnailListContainer { text-align: center; width: 200px; height: 200px; overflow: auto; } /* General Form Styling */ .formLabel { float:left; width:30%; text-align:right; font-weight: bold; margin: 2px; white-space: nowrap; clear: left; vertical-align: middle; margin-top: 8px; } #agreed_div { white-space: normal; } .formField { float:left; width:60%; margin: 2px; vertical-align: middle; margin-top: 8px; } .missing { color:red; font-weight:bold; } /** * Administration Styles */ .adminListHeader { float:left; height: 48px; background-repeat: no-repeat; text-align: left; font-size: 18px; font-weight: bold; padding-left: 80px; } .labelcell { margin-left: auto; font-weight: bold; vertical-align: top; width: 30%; } table.adminform td.labelcell { text-align: right; } .iconcell { vertical-align: top; width: 5%; } .shop_error, .shop_warning, .shop_info, .shop_debug, .shop_critical, .shop_tip { background-color:#FAFAD2; background-position:left 5px; background-repeat:no-repeat; border-color:#AACCAA; border-style:dotted none; border-width:1px 0pt; font-weight: 900; margin:1pt 1pt 1em 1em; padding:0.5em 1em 1.5em 48px; } .shop_error { background-image: url( images/error.png ); } .shop_warning { background-image: url( images/warning.png ); } .shop_info, .shop_tip { background-image: url( images/info.png ); } .shop_debug { background-image: url( images/log_debug.png ); } .shop_critical { font-weight: bold; background-image: url( images/log_critical.png ); } /** * Addtocart detail Styles */ .vmCartContainer { /* Cart Container */ width: auto; float: right; background: #cccccc; border: 1px solid #000; padding: 3px; } .vmCartChildHeading { /* Header for the cart */ font-size: 14px; font-weight: bold; padding-bottom: 3px; text-align: left; } .vmCartChild { /* Container for the Child Product */ vertical-align: middle; border: 1px solid #000; padding-left: 2px; padding-right: 2px; margin-bottom: 2px; float:left; } .vmChildDetail { /* Child Detail, description , attributes ,price, quantity etc */ vertical-align: middle; margin-top: 6px; } .vmCartChildElement { /* Individual element styling */ width: 100%; vertical-align: middle ; height: 25px; text-align: left; } .vmCartAttributes { /* Attributes Div*/ margin-top:8px; width:100%; } .vmAttribChildDetail { /* Product Attributes Styling */ } .vmMultiple { height:35px; } .vmChildType { /* Product type div*/ width: 100%; } .vmClearDetail { /*Clear the divs afer child types*/ clear: both; } .vmClearAttribs { /*Clear the divs before the attributes*/ clear:both; } .vmRowOne { /* Odd Row One styling */ background: #cccccc; } .vmRowTwo { /* Even Row Styling */ background: white; } /* Link Details for link to child*/ .vmChildDetail a, .vmChildDetail a:link { font-size : 11px; color : #000000; text-decoration : none; font-weight : bold; } .vmChildDetail a:hover { font-size : 11px; color : #333333; text-decoration : none; font-weight : bold; } /* Styling for the form elements to enable correct Line Up */ .inputboxquantity { margin-top: 3px; vertical-align: middle; } .availabilityHeader { text-decoration:underline; font-weight:bold; } .inputboxattrib { float: left; margin-top: 0px; vertical-align: middle; margin-bottom: 2px; } .quantitycheckbox { margin-top: 6px; vertical-align: middle; } /** * Addtocart detail Styles for placing attributes beside product_types */ .vmCartContainer_2up { /* Cart Container */ width: 100%; float: left; background: #cccccc; border: 1px solid #000; padding: 3px; } .vmCartChildHeading_2up { /* Header for the cart */ font-size: 14px; font-weight: bold; padding-bottom: 3px; text-align: left; } .vmCartChild_2up { /* Container for the Child Product */ vertical-align: middle; border: 1px solid #000; padding-left: 2px; padding-right: 2px; margin-bottom: 2px; float:left; } .vmChildDetail_2up { /* Child Detail, description , attributes ,price, quantity etc */ vertical-align: middle; margin-top: 6px; } .vmCartChildElement_2up { /* Individual element styling */ width: 100%; vertical-align: middle ; height: 25px; text-align: left; } .vmCartAttributes_2up { /* Attributes Div*/ float: left; padding: 0px 5px 5px 5px; margin: 0px 5px 5px 5px; width:50%; } .vmAttribChildDetail_2up { /* Product Attributes Styling */ } .vmMultiple { height:35px; } .vmChildType_2up { /* Product type div*/ background: #cccccc; padding: 0px 5px 5px 5px; margin: 0px 5px 5px 5px; float: left; width: 40%; border: 1px solid #000; } .vmClearDetail_2up { /*Clear the divs afer child types*/ } .vmClearAttribs_2up { /*Clear the divs before the attributes*/ clear:both; } .vmRowOne_2up { /* Odd Row One styling */ background: #cccccc; } .vmRowTwo_2up { /* Even Row Styling */ background: white; } /* Link Details for link to child*/ .vmChildDetail_2up a, .vmChildDetail_2up a:link { font-size : 11px; color : #000000; text-decoration : none; font-weight : bold; } .vmChildDetail_2up a:hover { font-size : 11px; color : #333333; text-decoration : none; font-weight : bold; } .vmCartModuleList { cursor : pointer; font-size : 11px; color : #000000; text-decoration : none; font-weight : bold; } .vmCartModuleList:hover { font-size : 11px; color : #333333; text-decoration : none; font-weight : bold; } .vmquote { margin: 4px; border: 1px solid #cccccc; background-color: #E9ECEF; padding: 10px; font-size: 12px; color: #254D78; } .editable { background: #ffff33; cursor: pointer; } ul.pagination li { padding: 2px 1px; display: inline; background: none; } .hr { clear:both; border:1px solid #FFFFFF; height:1px; width:100%; text-align:left; } .hr_div { height:10px; width:100%; } .clr { clear: both; overflow:hidden; } .box img, #child ul li a img { height:48px; margin:0 2px 0 0; width:64px; } #parent_img {width: 325px; height: 221px; margin-left: auto; margin-right: auto;} #parent_img a {text-decoration: none;} #parent_img a img {width: 325px; height: 221px} I'm having a funky issue with a page in IE. I've got tables and have css setting the border properties of cells in the table. My issue is when mousing over Anchors in td's in the table the borders of the td's will sometimes dissapear. Its just funky. Its doing it on 2 different machines running IE6 ...Has anyone esle seen this? Is this some variant of the Guillotine Bug? Hi all, I've tried searching around for this issue, but I've not found any help so far and it's driving me nuts. I hope someone here can advise. This is an abridged version of the site's code for example: Code: <style type="text/css"> <!-- #main1 { padding: 0px; margin: 0px; } #left { width:260px; margin:0; padding:0; float: left; } #left-top { background-image: url(../images/panel-top-left.gif); background-repeat: no-repeat; background-position: center top; height: 16px; margin: 0px; padding: 0px; } #left-middle { background-image: url(../images/panel-middle-left.gif); background-repeat: repeat-y; padding-right: 20px; padding-left: 20px; padding-bottom: 2px; } #left-bottom { background-image: url(../images/panel-bottom-left.gif); background-position: center; height: 18px; } #logo { background-image: url(../images/swalingslogo.gif); background-position: center top; width: 260px; height: 120px; background-repeat: no-repeat; } /* Navigation List */ #navlist { padding-left: 0; margin-bottom:10px; width: 217px; } #navlist li { list-style: none; margin-bottom:4px; padding: 0; font-size:1.2em; line-height:1.8em; width:217px; height:32px; background-image:url(../images/nav2.gif); background-repeat:no-repeat; margin-top: 0; margin-right: 0; margin-left: 0; } #navlist li a:link, #navlist li a:visited { display:block; text-decoration: none; color:#039; width:207px; height:32px; font-weight:bold; padding-top: 2px; padding-right: 5px; padding-bottom: 2px; padding-left: 5px; } #navlist li a:hover { text-decoration: none; color:#FF6600; } /* Testimonials */ div#fscroller { width:200px; height:200px; background-image:url(../images/bg-testimonials.gif); background-repeat:no-repeat; margin-left:8px; } div#fscroller p { margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 5px; } /* Middle Column */ #middle { margin-top: 0; margin-right: 0px; margin-bottom: 0; padding-right: 0px; padding-left: 0px; padding-top: 0px; text-align: justify; margin-left: 260px; } #middle #top-left { background-image: url(../images/panel-top-rightleft.gif); height: 16px; font-size: 2px; background-repeat: no-repeat; } #middle #top-right { float: right; margin-top: -16px; background-image: url(../images/panel-top-rightright.gif); height: 16px; width: 20px; font-size: 2px; } #middle a { color: #003399; } #middle a:hover { text-decoration: none; } /** Country Titles **/ #middle h2#unitedkingdom { background-image: url(../images/title-unitedkingdom.gif); background-repeat: no-repeat; height: 26px; width: 201px; margin-bottom: 6px; } #middle h2#antigua { background-image: url(../images/title-antigua.gif); background-repeat: no-repeat; height: 26px; width: 128px; margin-top: 16px; margin-bottom: 6px; } /* Minisite Links */ div.minisite { float: left; } div.minisite span { display: none; } div.minisite a { background-position: top; background-repeat: no-repeat; height: 168px; width: 190px; display: block; } div.minisite a:hover { background-position: bottom; } a#minisite-swimminglessons { background-image: url(../images/swimming-lessons-uk.jpg); } .clear { clear:both; } .hidden { display: none; } .notopgap { margin-top: 0; } .nobottomgap { margin-bottom: 0; } .inside { background: #EFEFEF; padding-left: 10px; padding-right: 10px; } --> </style> <div id="main1"> <div id="left"> <!-- Logo --> <div id="logo"></div> <div id="left-top"></div> <div id="left-middle"> <!-- Navigation --> <!--#include file="../inc/nav2.asp" --> <!-- Testimonials --> <!--#include file="../inc/testimonials.asp" --> <!--#include file="../inc/special-offers.asp" --> </div> <div id="left-bottom"></div> </div> <!-- Middle Column --> <a name="skipnav" class="hidden"></a> <div id="middle"> <div class="top-left"></div><div class="top-right"></div> <div class="insideleft"><div class="insideright"><div class="inside"><div class="gap-saver"></div> <!-- UK Sites --> <h2 id="unitedkingdom"><span class="hidden">United Kingdom</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swimming Lessons</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Residential Courses</span></a></div> <div class="clear"></div> <!-- Antigua Sites --> <h2 id="antigua"><span class="hidden">Antigua</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Soccer</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Parties and Events</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings International School of Swimming</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Babysitting and Nanny Agency</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Rugby</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Volleyball</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="clear"></div> <div class="gap-saver"></div> </div></div></div> <div class="bottom-left"></div><div class="bottom-right"></div> </div> <!-- End Middle Column --> </div> I've placed the Country Title in an H2 tag, then beneath that, each anchor is enclosed in a DIV, and is set as a left-floated block. Then I placed a spacer DIV (clear: both) to create a new line, then repeated with H2 and links. This all works fine in Firefox, IE7 and Opera, but of course IE6 is being a pig as usual. The spacer DIV is pushed to sit alongside the bottom of the left column, and I can't figure out how to (or if I can) stop this. I can't add in links properly, so I hope this is acceptable under the rules -- The site in question is: www.swalings .com/swalings/index4.asp and here's a screenshot of IE6 behaviour: www.swalings .com/images/swalings-ie6-troubleshoot.jpg Hopefully that's enough information to go on, please let me know if there's something I missed out. Thanks a lot! Rob Hi I am trying to make a table to display some stuff within a fix sized window. I want to have 5 columns of fixed width and one column that spans the rest of the remaining space. The Idea is to allow the widths of the first 5 columns to be changed by a script and having the last one adapting as needed... html Code: Original - html Code <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> css Code: Original - css Code div.container { height: 400px; width: 800px; overflow: scroll; } table { width: 100%; } td { border-style: solid; border-color: silver; border-width: 0px; padding: 1px 3px; } th { border-style: outset; border-color: silver; border-width: 2px; background: silver; padding: 1px 3px; }
It really does fill the entire space but the last column crushes all the other into their minimal width resulting in linebreaks between words inside the cells... Please help me Question title: A 2 column layout, let only the second column scroll horizontally and let them both scroll vertically Hello I did try several idea's, but all failed. Then I did search the web but found a list of > 400.000 in google. If someone is willing to tell me if it is possible and give me some directions, please do. Everything is welcome. I got a list with 3 columns ( basically you could say I have only two columns because 2-3 could be concatenated to together, but they have a different style and justification, but I could live to start with a two column sample) f.e line 1 : value_one - ( some_text - value_two (right justified) ) line 2 : value_one - ( some_text - value_two (right justified) ) line 99:.... e.t.c Column one has a fixed width of 32px. 'some text' can be longer then the wide available and value_two is with 3 spaces appended to column 2. I want that column one is fixed horizontal and that the second and the third column can scroll horizontally. Of course when there are more line's then the height of the container is should be posable to scroll vertically. Finally I need the color behind column one be different then the column 2 and 3. So what I did create is a container with two containers where the left one has a different colour then the right one and above those a container with the list. I have overflow on auto, so I get scroll-bars when necessarily. But my problem is that when I scroll horizontally that my first column scrolls away to the left. Basically my question is. How can I get a 2 column layout, let only the second column scroll horizontally ( first is locked in horizontal place ) and let them scroll both vertically? Hey, So I have a three column layout being implemented as such: html: Code: <div class="content"> <div class="col1 column"></div> <div class="col3 column"></div> <div class="col2 column"> <div class="header">Header</div> </div> </div> CSS: Code: .column { padding: 10px; position:relative; } .header { background:#cfe6f5; color:#416383; font-size:11px; font-family:Arial; font-weight:300; padding-left:15px; } .col1 { float: left; width:250px; } .col2 { margin-left: auto; margin-right: auto; } .col3 { float:right; width:250px; } The problem is that the width of the header div extends all the way to the left and right of the page when it's in the middle column, but behaves the way I want it to (extends to the left and right of the column) when it's in the left or right column. Any ideas? Thanks. --Surgery Hello, I am having difficulty with the center column on the following page: http://cbo4edu.org/index2.html I want to widen the center column so that the CBO NEWS heading touches the blue line which divides the center and right column. When I try to add width to the style sheet the left column moves out of alignment. Any help is much appreciated, thanks! can i make my left column, the same height as my right column? or infact, if the left is taller than the right, the right extends to it and if the right is taller than the left the left extends to it? is this possible, cheers heres my css: left column, is #leftNav and the right column is #contentMain PHP Code: #content { margin:0px auto; padding: 0; width: 760px; } #contentMain { padding: 0; margin: 0; float: right; width: 632px; } #leftNav { color: #000; float: left; margin: 0; padding: 0; width: 128px; } Hi, hopefully you enjoyed the title, I had a good laugh thinking of it in that split second it took me to write it. So, I found a 3 column css layout on a CSS generator website, because I got sick of trying to hack up layouts I've made in the past that didn't work. Anyhow, it was working fine with one line of content in each column when I tested it out, however, once content in the middle column was added, and stretched vertically beyond a certain point, it will drag the left columns content down with it. The right column is not affected in any way. I have spent a few hours trying to look for reasons as to why it would happen, but I had no luck. I would appreciate any help... so thank you in advance if you take a stab at it. Here's the html: Code: <body> <div id="pagewidth"> <div id="header"></div> <div id="wrapper" class="clearfix" > <div id="twocols" class="clearfix"> <div id="maincol">Main Text, woot. (aka hi hi hi)</div> <div id="rightcol">Sidebar, yippee.</div> </div> <div id="leftcol"> <div id="navigation">test</div> </div> </div> <div id="footer"></div> </div> </body> and the CSS: Code: html, body { background: #333399; margin:0; padding:0; text-align:center; font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal; color: black; } #pagewidth { width: 750px; text-align:left; margin-left:auto; margin-right:auto; background: #333399 url('images/bodycontent.gif') repeat-y center top; } #header { position:relative; height:138px; background: url('images/header.gif') center; width: 100%; } #leftcol { width: 118px; float: left; left: 25px; position: relative; background-color: transparent; margin:0; padding:0; } #twocols { width: 700px; float: right; position: relative; } #rightcol { width:180px; right: 25px; float:right; position:relative; background-color: transparent; } #maincol { background-color: transparent; float: left; left: 100px; display: inline; position: relative; width: 390px; } #footer { text-align: center; height:39px; background: url('images/footer.gif'); clear:both; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix{display: inline-table;} /* Hides from IE-mac \*/ * html .clearfix{height: 1%;} .clearfix{display: block;} /* End hide from IE-mac */ /*printer styles*/ @media print{ /*hide the left column when printing*/ #leftcol{display:none;} /*hide the right column when printing*/ #rightcol{display:none;} #twocols, #maincol{width:100%; float:none;} } Again, thank you in advance if you can come up with anything. I am a HTML&CSS novice - I am trying to write a page using a three column layout but the column colour doesn't reach the footer. I understand that this is a common problem and I've looked at a lot of examples on the web of how to work around this or create a better layout but I'm still not sure enough to know which would be the easiest and best to go within the page I have written. I want to avoid images but other than that any help would be great! I have validated the HTML & CSS and they are copied below (could any advice be really specific, as I said this is very new to me!). Thanks HTML: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Drivers Jonas Information Unit</title> <meta name="keywords" content="1" /> <link rel="stylesheet" type="text/css" href="djiucss.css" media="screen" /> <link rel="stylesheet" type="text/css" href="djiuprintcss.css" media="print" /> </head> <body> <div id="top"> <div id="picture"> <img src="GIF.gif" alt="DJ" width="200" height="100" /> </div> <div id="heading"> <div id="title"><h1>Drivers Jonas Information Unit</h1></div> </div> </div> <div id="left"> <br/><p><a href="about.html">About us</a></p><br/> <p><a href="company.html">Company Information</a></p><br/> <p><a href="legal.html">Legal information</a></p><br/> <p><a href="landreg.html">Land Registry</a></p><br/> <p><a href="research.html">Research</a></p><br/> </div> <div id="right"> <div id="title"><h2> News </h2></div> <ul> <li>The Information Unit has recently acquired a set of new APC guides</li> <li>If you would like any training on databases</li> <li>The Information Unit has created an economy timeline </li> </ul> </div> <div id="main"> <div id="title"><h2>Main stuff</h2></div> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin nec mi sit amet metus placerat egestas. Quisque porttitor massa eu lacus. Donec tristique, neque in sollicitudin euismod, enim tellus varius mauris, id vestibulum est massa id massa. Integer et purus. Vivamus condimentum tincidunt ipsum. Duis augue lorem, pretium vel, cursus at, vulputate sed, neque. Quisque justo. Nunc rhoncus. In ornare venenatis velit. </p> <p>Donec facilisis ante sit amet mauris. Nunc fermentum orci eu quam. Donec vestibulum. Vestibulum ultricies nisl eu eros. Curabitur urna. Duis enim erat, lobortis nonummy, mollis non, porttitor nec, nisi. Phasellus pulvinar purus eu pede. In mollis. Duis sit amet dui et arcu rhoncus auctor. Integer est dui, pharetra vel, volutpat ac, luctus in, elit. </p> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin ne</p> </div> <div id="bottom"> Drivers Jonas Information Unit </div> </body> </html> CSS: #top /*DJ logo and page title - includes h1*/ { color: black; font-family: arial, sans-serif; font-size: 20px; background: #d31145; padding-bottom: 15px; } body { color: black; font-family: arial, sans-serif; font-size:14px } img /*DJ logo*/ { padding: 20px; float:left; } #heading { text-align: center; padding:20px; } /*main page title*/ /*should change all reds to DJ red: #d31145*/ #left, #right, #main { color: white; background: black; } #left { float: left; width:140px; border-right:2px solid #d31145; text-align:left; padding-left: 1em; } #right { float:right; width:140px; border-left:2px solid #d31145; text-align:left; padding-right: 1em; } #main { margin-left: 150px; margin-right: 150px; border-left: 1px solid; border-right: 1px solid; padding: 1em; } #bottom { clear:both; margin: 0; color:black; background: #d31145; font-size: 16px; font-family: Arial, sans-serif; text-align: center; } #title { text-align:center; } a:link {color:white} a:visited {color:silver} a:hover {color:#d31145} a:active {color:#d31145} Hi, http://www.dudley.nhs.uk/search.asp has a two column effect. The CSS for it is he http://www.dudley.nhs.uk/css/screen.css I was wondering why if there is a table in the right hand column with a width percentage over 77% there is some horizontal scrolling? This happens in IE. Any help would be greatly appreciated. Thanks. Janusz Jasinski hi all, right have got a problem which has been bugging me for days now. i have 4 columns in a row (inside a wapper div)which all will have different content image, text other divs/classes etc. now one of these columns will be quite fluid as it will have different text on each page meaning it will be quite long on some pages not on others. the problem i am getting is in the good browsers firefox etc its ok in IE6+. the wapper does'nt seem to see the divs in the content meaning it does not get filled, meaning that the footer flys to the top and not where it should be, i dont have a live version but heres the code: mainly thanks Dan <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- #con { width:940px; height:400px; background-color:#00FFFF; } #wapper { width:940px; background-color:#006666; } #box { width:940px; background-color:#000033; height:40px; } #menu-pronuptia { width:185px; background-color:#6633CC; float:left; display:inline; } #menu-pronuptia1 { width:185px; background-color:#009900; display:inline; float:left; } #menu-pronuptia2 { width:385px; background-color:#0033CC; display:inline; float:left; clear:inherit; } #menu-pronuptia3 { width:185px; background-color:#CCCC33; display:inline; float:left; } --> </style> </head> <body> <div id="wapper"> <div id="menu-pronuptia"> <p>test</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia1"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia2"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia3"> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> <div id="box"> <p><br /> </div> </body> </html> 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! hello. I am currently using a simple horizontal top menu with a vertical drop down. I would like to change the vertical drop down to be horizontal, multi column, and should accomodate more than one line, if possible. The example I'm going for is used as top navigation he nfl - baltimore ravens home page and he ge home page Here is the code I'm using currently (would like it to be all CSS). #### ul#mainNavigation { padding-left:185px; } ul#mainNavigation li { padding:0 16px; float: left; display:inline; position: relative; list-style: none; color:White; _width:1px; } ul#mainNavigation li.Seperator { padding:0px; _width:1px; } ul#mainNavigation li.over { background-color:white; } ul#mainNavigation li.over a { color:Red; } ul#mainNavigation li a { color:White; text-transform:uppercase; text-decoration:none; font-weight:bold; display:block; } ul#mainNavigation a:hover { color: Red; } ul#mainNavigation li a { display: block; } ul#mainNavigation li p { height:19px; } ul#mainNavigation li ul { display: none; position: absolute; background-color:Black; opacity:.8; filter: alpha(opacity=80); -moz-opacity: 0.8; margin-left:-16px; } ul#mainNavigation li.over ul { display: block; z-index:999; } ul#mainNavigation li.over ul li { float: none; background:none; border:none; white-space:nowrap; padding:0px; } ul#mainNavigation li.over ul li a { color: white; padding:5px; border-bottom:solid 1px black; } ul#mainNavigation li.over ul li a:hover { background: #3d1f6e; color: white; } ~~~~~~~ HTML ~~~~~~~~~~~~~~ <ul id="mainNavigation"> <li> <p><a href="Mainlink1.html">Mainlink1</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> <li> <p><a href="Mainlink2.html">Mainlink2</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> </ul> #### Thank you, in advance! ~ lahddah I'm having trouble with two divs aligning side by side. My container and right menu divs don't seem to line up next to each other. The right div moves down. http://www.willisemail.co.uk/skill/ The link to the page is above any help would be really great. The stylesheet is below... Thanks Jemes html { padding:0px; margin:0px; } body { background-color: #e1ddd9; font-size: 12px; color: #564b47; text-align:center; margin:0px; padding:0px; } /* Site Holder Start */ #box { width: 689px; margin: 0px auto; padding: 0px; text-align: left; border: 1px solid #000000; background-color: #ffffff; background-image:url(../Images/mid.jpg); } /* Site Holder End */ /* Site Holder Start */ #box2 { margin-left: 46px; margin-right: 42px; margin-top: 10px; margin-bottom: 10px; padding: 0px; text-align: left; border: 1px solid #FF0000; } /* Site Holder End */ /* Content Start */ #content { width: 430px; padding:0px; background-color:#fff; overflow: auto; border: 1px solid #000000; } /* Content End */ /*Right Menu Start*/ #right { width:150px; padding:0px; float:right; background-color:#fff; border: 1px solid #000000; } /*Right Menu End */ /* Top Start */ #head { background-color:#fff; } /* Top End */ Back to top I want these two columns: [link] to be closer together and an equal distance from the background on each side. Right now my CSS looks like this: #column5 { position:absolute; left:435px; top:127px; width:300px; height:638px; z-index:4; background-color: #FFFFFF; padding: 20px; overflow: visible;} #column6 { position:absolute; left:1px; top: 127px; width: 732px; height:638px; z-index:4; background-color: #FFFFFF; padding: 20px; overflow: visible;} Any help would be greatly appreciated! Thanks! How do I get a two column stylesheet so that the height of the left hand area will be the same for the right hand menu. http://www.willisemail.co.uk/skill/ Any help would be great. Jemes html { padding:0px; margin:0px; } body { background-color: #F5F5F5; font-size: 12px; color: #564b47; text-align:center; margin:0px; padding:0px; } /* Site Holder Start */ #box { width: 750px; margin: 0px auto; padding: 0px; text-align: left; border: 1px solid #979696; background-color: #FFFFFF; background-image:url(../Images/mid.jpg); } /* Site Holder End */ /* Site Holder Start */ #box2 { margin-left: 49px; margin-right: 50px; margin-top: 10px; margin-bottom: 10px; padding: 0px; text-align: left; } /* Site Holder End */ /* Content Start */ #content { width: 461px; padding:0px; background-color:#FFF; overflow: hidden; } /* Content End */ /* Content Start */ #content2 { margin-left: 14px; margin-right: 15px; margin-top: 0px; margin-bottom:0px; padding:0px; background-color:#FFF; overflow: hidden; } /* Content End */ /*Right Menu Start*/ #right { width: 178px; padding:0px; float:right; background-color:#FFF; overflow: hidden; } /*Right Menu End */ /*Right2 Menu Start*/ #right2 { margin-top:0px; margin-left:0px; margin-right:0px; padding:0px; background-color:#FFF; overflow: hidden; } /*Right2 Menu End */ .imgRight { text-align:center; margin-top: 10px; margin-left:14px; margin-right:14px; border: 1px solid #979696; } .imgMain { text-align:center; margin-top:10px; border: 1px solid #979696; } .Menu { margin-top:10px; padding: 0px; } .Menu ul { padding: 0px; margin:0px; list-style-type:none; } .Menu li { display: inline; list-style-type:none; padding-top: 0px; padding-bottom: 0px; padding-right: 1px; padding-left: 0px; margin:0px; } .Main { margin: 0px; border: 1px solid #979696; margin-top:8px; margin-bottom:10px; } Hi, Im trying to create a basic layout for a website. I need to add a column to the right hand side ofmy main content area, but I havent been having much luck. Attached is a picture showing what im trying to do. My HTML: 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"> <head> <meta name="Gallery" content="Place Filler" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Test</title> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="reset.css" /> </head> <body> <div id="header">Test</div> <h2>Testing Gallery</h2> <div class="demo3"> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> <span class="photo"> <a href="#">Red Eye Frog</a> </span> </div> <p> <a href="http://validator.w3.org/check?uri=referer"> <img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Strict!" /> </a> <a href="http://jigsaw.w3.org/css-validator/check/referer"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /> </a> </p> <div id="footer">Test</div> </body> </html> My CSS: Code: /* body { font : 0.78em/1.5 Tahoma; } #header{ background : black; width:98%; height:60px; margin-top:0px; margin-bottom:13px; border-style:solid; border-width:1px; border-color:#e2e2e2; margin-left: auto ; margin-right: auto ; } .demo3 { margin-left: 1% ; margin-right: 1% ; text-align : center; width: 98%; background : black } .photo { width : 150px; height : 100px; height : auto; background : black url(http://static.flickr.com/45/132753346_c2e3722298_m.jpg) no-repeat; border : 4px solid #dedede; margin-top : 8px; margin-left : 1%; margin-right : 1%; margin-bottom : 8px; display : inline-block; text-align : center; padding : 80px 0 0 0; } .photo a { color : white; text-decoration : none; padding : 2px 12px; font-style : normal; display : inline-block; } .photo a:hover { color : #ff0033; } #footer{ background : black; width:98%; height:40px; margin-top:13px; border-style:solid; border-width:1px; border-color:#e2e2e2; margin-left: auto ; margin-right: auto ; } Should I be putting a div within another div and then setting its width and alignment, or is that no a good way of doing it? |