Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    More IE vs FF spacing problems

    Hi guys seemingly simply FF vs IE spacing issue. Text list on sidebar needs to line up correctly with background image in div. Just getting back into CSS after lonnng abscence. And the heart is not growing fonder. I know this code is not the best way to go about some things . Thanks for any help.

    this is page

    http://www.awdwest.com/problem/mainPage.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Code:
    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>
    <!--
    a:link { color: #686868; text-decoration: none;}
    a:visited { color: #686868; text-decoration: none;}
    a:active { color: #666; text-decoration: none;}
    a:hover { color: #000; text-decoration:none;}
    -->
    </style>
    <style type="text/css"> 
    <!-- 
    body  {
    	font: 100% Verdana, Arial, Helvetica, sans-serif;
    	background: #666666;
    	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    	padding: 0;
    	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    	color: #000000;
    	background-color: #FFF;
    	
    	
    }
    .twoColHybLtHdr #container {
    	width: 900px;  /* this will create a container 80% of the browser width */
    	background: #ffffff;
    	margin: 0 auto;
    	text-align: left;
    	
    } 
    .productBox {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	color: #333;
    	text-decoration: none;
    	background-color: #FFF;
    	text-align: left;
    	text-indent: 0px;
    	line-height: 5px;
    	border-top-color: #CCC;
    	border-right-color: #FFF;
    	border-bottom-color: #FFF;
    	border-top-style: solid;
    	border-top-width: thin;
    	height: 120px;
    	margin-top: 1px;
    	width: 625px;
    	padding-bottom: 2px;
    }
    .twoColHybLtHdr #header {
    	background: #ffffff;
    	text-align: center;
    } 
    .graphic {
    	text-align: center;
    	width: 100px;
    	height: 100px;
    	float: left;
    	border-top-color: #000;
    	border-right-color: #000;
    	border-bottom-color: #000;
    	border-left-color: #000;
    	border-top-style: solid;
    	border-right-style: solid;
    	border-bottom-style: solid;
    	border-left-style: solid;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	margin-top: 0px;
    	margin-left: 5px;
    }
    .productDescription {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	font-style: normal;
    	line-height: normal;
    	font-weight: bold;
    	color: #333;
    	text-decoration: none;
    	position: absolute;
    	text-align: left;
    	margin-left: 170px;
    	
    	margin-top: 15px;
    }
    .pageHeader {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 36px;
    	font-style: normal;
    	color: #00ff00;
    	font-weight: 100;
    	text-align: left;
    	margin: 0 12px 0 7.8em;
    	float: none;
    }
    .logo {
    }
    .menuTop {
    	text-align: center;
    }
    .topLink {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-weight: normal;
    }
    .breadcrumbs {
    	background-image: url(images/breadcrumbBar.png);
    	margin-left: 0px;
    	margin-right: 0px;
    	text-indent: 3px;
    	vertical-align: middle;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    }
    .footerMine {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-style: normal;
    	font-weight: bold;
    	background-color: #FFF;
    }
    .pageTitle {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: large;
    	font-style: normal;
    	font-weight: bold;
    	font-variant: normal;
    	color: #00ff00;
    	margin: 0 20px 0 15em;
    	text-align: left;
    }
    .twoColHybLtHdr #header h1 {
    	margin: 0;
    	background-position: center;
    }
    .topRate {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-weight: bold;
    	color: #000;
    	text-decoration: none;
    }
    .downloads {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-style: normal;
    	font-weight: bold;
    	color: #686868;
    }
    .dowloadLink {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	color: #00ff00;
    	font-weight: bold;
    	font-variant: normal;
    	text-decoration: none;
    }
    
    /* Tips for sidebar1:
    1. Since we are working in relative units, it's best not to use padding on the sidebar. It will be added to the overall width for standards compliant browsers creating an unknown actual width. 
    2. Since em units are used for the sidebar value, be aware that its width will vary with different default text sizes.
    3. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".twoColHybLtHdr #sidebar1 p" rule.
    */
    .twoColHybLtHdr #sidebar1 {
    	float: left;
    	width: 265px; /* since this element is floated, a width must be givenT THIS CONTROLS BOX PLACEMENT*/
    	background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
    	padding: 0px; /* top and bottom padding create visual space within this div  */
    	background-image: url(images/videoramaWhite2SideMenu.png);
    	margin-top: 10px;
    	height: 550px;
    	background-repeat: no-repeat;
    }
    
    .twoColHybLtHdr #sidebar1 h3, .twoColHybLtHdr #sidebar1 p {
    	margin-left: 21px; /* the left and right margin should be given to every element that will be placed in the side columns THIS CONTROLS TEXT*/
    	margin-right 0px;
    	padding-top:10px;
    	text-decoration: none;
    	text-transform: none;
    	line-height: 16px;
    	margin-top: 20px;
    }
    .menuTopDownload {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-style: normal;
    	font-weight: bold;
    	color: #000;
    	text-align: right;
    }
    /* Tips for mainContent:
    1. The space between the mainContent and sidebar1 is created with the left margin on the mainContent div.  No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends.
    2. Be aware it is possible to cause float drop (the dropping of the non-floated mainContent area below the sidebar) if an element wider than it can contain is placed within the mainContent div. WIth a hybrid layout (percentage-based overall width with em-based sidebar), it may not be possible to calculate the exact width available. If the user's text size is larger than average, you will have a wider sidebar div and thus, less room in the mainContent div. You should be aware of this limitation - especially if the client is adding content with Contribute.
    3. In the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This may help avoid several IE-specific bugs.
    */
    .twoColHybLtHdr #mainContent {
    	margin: 0 20px 0 17em; /* the right margin can be given in percentages or pixels. It creates the space down the right side of the page. */
    	border-top-color: #CCC;
    	border-right-color: #CCC;
    	border-bottom-color: #CCC;
    	border-left-color: #D6D6D6;
    	border-top-style: solid;
    	border-right-style: solid;
    	border-bottom-style: solid;
    	border-left-style: solid;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	font-family: Arial, Helvetica, sans-serif;
    	margin-top: 10px;
    	text-align: left;
    	width: 625px;
    } 
    .twoColHybLtHdr #footer {
    	padding: 0 10px;
    	text-align: center;
    	background-color: #FFF;
    } 
    .twoColHybLtHdr #footer p {
    	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    	text-align: center;
    	background-color: #FFF;
    }
    
    /* Miscellaneous classes for reuse */
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    	float: right;
    	margin-left: 8px;
    }
    .fltlft { /* this class can be used to float an element left in your page */
    	float: left;
    	margin-right: 8px;
    }
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    	clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    }
    .left-element {
    	position: absolute;
    	width: 50%;
    	left: 0px;
    }
    .right-element {
    	text-align: right;
    	position: absolute;
    	width: 50%;
    	right: 0px;
    }
    .menuLeftITem {
    	font-size: 11px;
    	color: #686868;
    	font-family: Arial, Helvetica, sans-serif;
    	font-style: normal;
    	text-indent: 15px;
    	font-weight: 800;
    	height: 400px;
    	line-height: 100%;
    	text-decoration: none;
    
    }
    .floatRight {
    	float: right;
    	margin-left: 8px;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-style: normal;
    	font-weight: bold;
    	color: #666;
    }
    .floatleft {
    	float: left;
    	margin-left: 8px;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-style: normal;
    	font-weight: bold;
    	color: #666;
    }
    .topSmall {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	color: #00ff00;
    	font-weight: bold;
    	font-variant: normal;
    	text-decoration: none;
    }
    .topSmallDark {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	color: #0C3;
    }
    .topSmallDark {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	color: #333;
    	font-weight: bold;
    	font-variant: normal;
    	text-decoration: none;
    }
    
    
    --> 
    </style><!--[if IE]>
    <style type="text/css"> 
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColHybLtHdr #sidebar1 { padding-top: 30px; }
    .twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; }
    /* the above proprietary zoom property gives IE the hasLayout it may need to avoid several bugs */
    </style>
    <![endif]--></head>
    
    <body class="twoColHybLtHdr">
    <div id="container">
      <div id="header"></div>
      <div class="logo" id="logo"><img src="images/logo.png" width="900" height="117" alt="Logo" /></div>
      <div class="menuTop" id="menuTop"><img src="images/topMenu.png" width="640" height="65" /></div>
      <div class="breadcrumbs">    <p><span style="float:left;"><span class="menuLeftITem">Home:</span><span class="topSmall"> Rentals</span></span><span style="float:right;"><span class="dowloadLink">Download</span><span class="menuLeftITem">:</span><span class="topLink"><a href="PDF/prices.pdf" target="_blank" class="menuLeftITem"> Rental Rate Sheet </a></span></span></p>
    <br style="clear:both;" /></div>
    
    
    <div id="sidebar1">
        <h3 class="menuLeftITem"><a href="file:///C|/Documents and Settings/Administrator/Desktop/vtrPackage.html" target="_self"> <br />
          VTR Packages</a><br />
          DVRs/VCRs<br />
          SD Monitors<br />
          HD Monitors<br />
          Accessories<br />
          Digital Switchers<br />
          Wireless Systems<br />
          Printers<br />
          Video Camera Packages<br />
          Hd Cards Storage<br />
          Camera Accessories<br />
          Video Projectors &amp; Screens <br />
          <br />
          <br />
          <br />
          All <br />
          <br />
          <br />
          All <br />
          <br />
          <br />
        All </h3>
        <div class="downloads" id="downloads">
          <p><br />
            <span class="dowloadLink">download</span> <span class="menuLeftITem"><a href="PDF/prices.pdf" target="_blank">Rental Rate Sheet</a></span><br />
            <span class="dowloadLink">download</span><span class="menuLeftITem"> <a href="PDF/rental Agreement.pdf" target="_blank"> Rental Agreement</a></span><br />
            <span class="dowloadLink">download</span> <span class="menuLeftITem"><a href="PDF/CC.pdf" target="_blank">Credit Card Authorization</a></span><br />
            <span class="dowloadLink">download </span><span class="menuLeftITem"><a href="PDF/w9.pdf" target="_blank">W-9 Form</a></span><br />
          </p>
          <p>&nbsp;</p>
        </div>
        <h3 class="menuLeftITem"><br />
        </h3>
        <!-- end #sidebar1 -->
      </div>
      <div class="pageHeader" id="pageTitle">VTR Packages</div>
      <div id="mainContent">
        <div class="productBox" id="product">
          <p><span class="productDescription">Digital 1 Camera System<br />
            <br />
            -includes 2 x 9' monitors, 1 x 20' monitor, stands, cabling and aks<br />
            <br />
            Price 600/day <br />
          </span><img src="images/image007.jpg" width="114" height="114" class="graphic" /></p>
          <p><br />
          </p>
        </div>
       <div class="productBox" id="product">
          <p><span class="productDescription">Digital 1 Camera System<br />
            <br />
            -includes 2 x 9' monitors, 1 x 20' monitor, stands, cabling and aks<br />
            <br />
            Price 600/day <br />
          </span><img src="images/image007.jpg" width="114" height="114" class="graphic" /></p>
          <p><br />
          </p>
        </div>
       <div class="productBox" id="product">
          <p><span class="productDescription">Digital 1 Camera System<br />
            <br />
            -includes 2 x 9' monitors, 1 x 20' monitor, stands, cabling and aks<br />
            <br />
            Price 600/day <br />
          </span><img src="images/image007.jpg" width="114" height="114" class="graphic" /></p>
          <p><br />
          </p>
        </div>
        <div class="productBox" id="product">
          <p><span class="productDescription">Digital 1 Camera System<br />
            <br />
            -includes 2 x 9' monitors, 1 x 20' monitor, stands, cabling and aks<br />
            <br />
            Price 600/day <br />
          </span><img src="images/image007.jpg" width="114" height="114" class="graphic" /></p>
          <p><br />
          </p>
        </div>
        <!-- end #mainContent -->
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <br class="clearfloat" />
      <div class="footerMine" id="footer">
        <p class="breadcrumb2">Videorama! Industries 2009</p>
        <!-- end #footer -->
      </div>
      <!-- end #container -->
    </div>
    </body>
    </html>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    So where's the problem; in IE/FF?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Dec 2007
    Posts
    107
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Seems like the problem is with IE. The text in side bar not looking good positioned.

    Try giving explicit height and alignment properties to the <div> in that area. In IE i think one should always specify the container properties explicitly.
    Programming & Webmaster Forum - AdSense Revenue Sharing forum

  • #4
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Quote Originally Posted by technica View Post
    Seems like the problem is with IE.
    Problems will almost always be with IE. Never, ever trust IE to do anything right.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •