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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    140
    Thanks
    52
    Thanked 0 Times in 0 Posts

    alignment broken in IE

    heres my full code

    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" />
    <title>Dark Color Template</title>
    
    <style type="text/css">
    
    html {height:100%;}
    body {
    margin:0;
    padding:0;
    height:100%;
    font-size: 12px;
    background-color: #333333;
    font-family: Verdana, Geneva, sans-serif;
    }
    a{
    	text-decoration: none;
    	color:#FFFFFF;
    }
    a:hover {
    	color: #00CC00;
    	text-decoration: underline	
    }
    #wrap {
    background:url(bg200.gif) top right repeat-y;
    min-height:100%;
    margin:auto;
    position:relative;
    }
    * html #wrap {height:100%;
    }
    #header{
    	padding: 20px;
    	border-bottom: 1px solid #000000;
    
    } 
    #logo {
    	border-right: 2px solid #000000;
    	padding-right: 11px;
    	float: left;
    }
    #msg {
    	border-left: 2px solid #999999;
    	margin-left: 62px;
    	padding-left: 11px;
    	height: 50px;
    	color: #FFFFFF;
    	font-size: 24px;
    	
    }
    #inner-wrap {
    padding-top: 20px;
    border-top: 1px solid #666666;
    padding-bottom:100px;
    }
    #inner-wrap:after {
    content:" ";
    display:block;
    clear:both;
    }
    #footer {
    position:absolute;
    bottom:0;
    width:100%;
    height:80px;
    background-color: #111;
    color:#FF00FF;
    text-align:center;
    } 
    #left {
    	float: left;
    	width: 300px;
    	text-align: center;
    	padding-top: 20px;
    	
    }
    #right {
    float:right;
    width:200px;
    text-align:center;
    }
    #content {
    	position: relative;
    	margin-right: 240px;
    	
    }	
    #main {
    position:relative;
    margin-left: 300px;
    
    } 
    #indented ul{
    	text-align: left;
    	margin: 20px 0; padding: 0;
    	list-style: none;
    }
    #indented ul li {
    	border-top: 1px solid #666666;
    	border-bottom: 1px solid #111;
    	border-left: 2px solid #999;
    }
    #indented ul li:first-child {border-top: none;}
    #indented ul li:last-child {border-bottom: none;}
    #indented ul li a {
    	padding: 2px;
    	display: block;
    	color: #666666;
    	text-decoration: none;
    }
    #indented ul li a:hover {
    color: #FFFFFF;
    background: #222;
    
    }
    
    /* MENU STYLE - IGNORE EVERYTHING ABOVE THIS LINE IF YOU WISH */
    
    #menu {
    	position: absolute;
    	top: 0;
      	height: 20px;
      	clear: both;
    }
    
    ul#nav {
    	width: 700px;
      float: left;
      margin: 0;
      padding: 0;
      list-style: none;
    
    }
    
    ul#nav li {
      display: inline;
    }
    
    ul#nav li a {
      float: left;
      line-height: 20px;
      color: #00CC00;
      text-decoration: none;
      margin: 0;
      padding: 0 30px;
      
    }
    
    /* APPLIES THE ACTIVE STATE */
    ul#nav .current a, ul#nav li:hover > a  {
      color: #fff;
      text-decoration: none;
    
    
    }
    
    /* THE SUBMENU LIST HIDDEN BY DEFAULT */
    ul#nav  ul {
      display: none;
    }
    
    /* WHEN THE FIRST LEVEL MENU ITEM IS HOVERED, THE CHILD MENU APPEARS */
    ul#nav li:hover > ul {
      position: absolute;
      display: block;
      float: left;
      height: 20px;
      margin: 20px 0 0 0;
      background: #333333; 
    
    }
    
    ul#nav li:hover > ul li a {
      line-height: 20px;
      color: #ffffff;
      text-decoration: none;
      margin: 0;
      padding: 0 30px 0 0;
     
    }
    
    ul#nav li:hover > ul li a:hover {
      color: #00CC00;
      text-decoration: none;
    
    }
    
    
    
    
    
    .box {
    	color: #fff;
    	padding: 22px;
    	background: #666666;
    	margin: 3px;
    	border-top: 1px solid #111;
    	-webkit-border-radius: 5px;
    	-moz-border-radius: 5px;
    	border-radius: 5px;
    }	
    .lbox {
    	margin: auto;
    	color: #fff;
    	padding: 10px;
    	background: #222;
    	-webkit-border-radius: 5px;
    	-moz-border-radius: 5px;
    	border-radius: 5px;
    	text-align: center;
    	box-shadow: 0 0 5px #111;
    	-webkit-box-shadow: 0 0 5px #111;
    }
    .head {
    	background: #666666;
    	display: block;
    	padding: 3px;
    	-webkit-border-radius: 5px;
    	-moz-border-radius: 5px;
    	border-radius: 5px;
    	
    	}
    
    .searchform {
    	display: inline-block;
    	zoom: 1; /* ie7 hack for display:inline-block */
    	*display: inline;
    	-webkit-border-radius: 2em;
    	-moz-border-radius: 2em;
    	border-radius: 2em;
    }
    .searchform .searchbutton {
    	background-color: #666666;
    	color: #ffffff;
    	font-size: 11px;
    	height: 27px;
    	width: 27px;
    	-webkit-border-radius: 2em;
    	-moz-border-radius: 2em;
    	border-radius: 2em;
    }
    .searchfield {
    	background: #fff;
    	padding: 1px;
    	width: 200px;
    	outline: none;
    	-webkit-border-radius: 2em;
    	-moz-border-radius: 2em;
    	border-radius: 2em;	
    }	
    <!--[if IE]>
    <style type="text/css">
    #content,
    #main,
    #inner-wrap,
    #wrap {
    zoom:1;
    }
    </style>
    <![endif]-->
    
    </style>
    </head>
    
    <body>
    
    
    
    
    
    
    <!--wrap begin-->
    <div id="wrap">
    
    
    
    
    
    
    
    <!--header--><div id="header">
    
    <div id="logo"><img src="images/logo.png" width="50" height="50" /></div>
    <div id="msg"><font color="#666666">Web<font color="#999999">Graphic</font></font><font color="#CCCCCC">Designer</font><br />
    <font size="2" color="#009966">High Quality Design</font></div>
    
    
    
    
    
    </div><!--header-->
     <div id="left">
     <div class="lbox" style="width: 200px;">
     <font class="head">Designed By: R</font>
     <br />
    <img src="images/r.png" /> <img src="images/m.png" />
     <p style="background: #333333; padding: 4px;">
     For more templates, please visit yahoo.com </p>
    </div>
     <br />
     <div class="lbox" style="width: 200px;">
     <font class="head">Lorem ipsum</font>
     <p style="background: #333333; padding: 4px;">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque </p>
    </div>
     </div>
     
     
     <!--inner--><div id="inner-wrap">
       
       <!--main-->
       <div id="main"> 
       
       
       <!--right-->    <div id="right">
    
    <div id="indented">
    <ul>
    
    <li><a href="#"><img src="images/facebook.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Share on Facebook</a></li>
    <li><a href="#"><img src="images/twitter.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Tweet this!</a></li>
    <li><a href="#"><img src="images/youtube.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Watch me!</a></li>
    <li><a href="#"><img src="images/wordpress.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Visit my Blog!</a></li>
    <li><a href="#"><img src="images/google.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Google Search</a></li>
    <li><a href="#"><img src="images/deviantart.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>View art</a></li>
    <li><a href="#"><img src="images/delicious.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>Add on del.icio.us</a></li>
    <li><a href="#"><img src="images/yahoo.png" width="25" height="25" align="absmiddle" style="margin-right: 10px;"/>e-Mail me</a></li>
    </ul>
    </div>
    
    
    </div><!--right--> 
       
       
       
       
      
      
      
      
      <!--content-->
      <div id="content"> 
    <div align="right">
    <form class="searchform">
    	<input class="searchfield" type="text" value="Search..." onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" />
    	<input class="searchbutton" type="button" value="Go" />
    </form>
    </div>
      
      <div class="box" style="position: relative; background: #111; box-shadow: 0 0 10px #111; -webkit-box-shadow: 0px 5px 20px #000;">   <div id="menu">
    
    <ul id="nav">
    <li><a href="#">Navigation</a>
    	<ul>
    	<li><a href="#">Home</a></li>
    	<li><a href="#">Blog</a></li>
    	<li><a href="#">Forum</a></li>
        <li><a href="#">gallery</a></li>
        <li><a href="#">Downloads</a></li>
        <li><a href="#">Contact Us</a></li>
        <li><a href="#">videos</a></li>
        <li><a href="#">wallpaper</a></li>
    	</ul>
    </li>
    <li><a href="#">Portfolio</a>
    	<ul>
    	<li><a href="#">Banner ad</a></li>
    	<li><a href="#">Flash Animation</a></li>
    	<li><a href="#">Templates</a></li>
    	</ul>
    </li>
    
    <li><a href="#">Connect</a>
    	<ul>
    	<li><a href="#">Facebook</a></li>
    	<li><a href="#">Google +</a></li>
    	<li><a href="#">Yahoo</a></li>
        <li><a href="#">Skype</a></li>
    	</ul>
    </li>	
    </ul>
     </div> 
     </div>
     
     
    <div class="box" style="box-shadow: 0px 5px 20px #000; -webkit-box-shadow: 0px 5px 20px #000; background: #222;  ">
    <b>Hello RPM</b>
    
    <p>
    <img src="images/r.png" width="80" height="58" style="float: left; margin: 5px;" />
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh. Donec nec libero.
    <br />
    <center>***</center>
    <br />
    <img src="images/m.png" width="80" height="58" style="float: left; margin: 5px;" />
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh. Donec nec libero.</p>
    </div> 
    <br />
    <div class="box" style="box-shadow: 0px 5px 20px #111; -webkit-box-shadow: 0px 5px 20px #000; background: #222">
    <b>Hello RPM</b>
    
    <p>
    <img src="images/logo.png" width="50" height="75" style="float: left; margin: 5px;" />
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh. Donec nec libero.</p>
    </div> 
       </div><!--content-->
       </div>
       <!--main-->
       
       
       
       
     </div>
     <!--inner-->
    
     
     
     
     
     
     
     
     
     
     <!--footer--> <div id="footer">Footer</div><!--footer-->
    </div> 
    <!--wrap begin-->
    
    
    
    
    </body>
    </html>

    its ok in firefox but as you can see in IE my #content div or center element and also my footer div misplaced.

    I thought the problem was because of my menu it is "floated right" in firefox but I really dont know why not in IE,
    Last edited by finoy_ako; 11-01-2011 at 06:24 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello finoy_ako,
    You must be seeing this problem in IE6? I think it is ok in IE7 and up.

    You have #left floated left but you do not make room for that column and #inner-wrap to go beside each other. Instead, you margin #main over to allow for #left.

    Not sure, but that could be the problem.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    finoy_ako (11-02-2011)


  •  

    Posting Permissions

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