Results 1 to 2 of 2

Thread: Works in FF but not in IE - help please

  1. #1
    Join Date
    Mar 2005
    Location
    Western Australia
    Posts
    148
    Thanks
    24
    Thanked 4 Times in 4 Posts

    Default Works in FF but not in IE - help please

    Hi Guys

    I have a layout that I have derived from the CSS templates found on this site and have combined a few to come up with the following, It appears to work very well in FF 2/3 but not in IE. Can you please help me work out why it is not working in IE and help fix my 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" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Dynamic Drive: CSS Liquid Layout #2.1- (Fixed-Fluid)</title>
    <style type="text/css">
    
    body{
    margin:0;
    padding:0;
    line-height: 1.5em;
    }
    
    b{font-size: 110%;}
    em{color: red;}
    
    #pagewrapper {
    	width:75%;
    }
    
    #topsection{
    background: #EAEAEA;
    height: 90px; /*Height of top section*/
    }
    
    #topsection h1{
    margin: 0;
    padding-top: 15px;
    }
    
    #contentwrapper{
    float: left;
    width: 100%;
    }
    
    #contentcolumn{
    margin-left: 22%; /*Set left margin to LeftColumnWidth*/
    }
    
    #leftcolumn{
    float: left;
    width: 22%; /*Width of left column*/
    margin-left: -100%;
    background: #C8FC98;
    }
    
    #footer{
    clear: left;
    width: 100%;
    background: black;
    color: #FFF;
    text-align: center;
    padding: 4px 0;
    }
    
    #footer a{
    color: #FFFF80;
    }
    
    .innertube {
    margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
    margin-top: 0;
    }
    
    #bcontentwrapper {
    float: left;
    width: 100%;
    }
    
    #bcontentcolumn {
    margin-right: 33%; /*Set right margin to RightColumnWidth*/
    }
    
    #brightcolumn {
    float: left;
    width: 33%; /*Width of right column in pixels*/
    margin-left: -33%; /*Set left margin to -(RightColumnWidth) */
    background: #FDE95E;
    }
    
    #ccontentwrapper{
    float: left;
    width: 100%;
    margin-left: -33%; /*Set left margin to -(RightColumnWidth)*/
    }
    
    #ccontentcolumn{
    margin: 0 33% 0 33% /*Set margin to 0 (LeftColumnWidth) 0 (RightColumnWidth)*/
    }
    
    #cleftcolumn{
    float: left;
    width: 33%; /*Width of left column in percentage*/
    margin-left: -33%; /*Set left margin to -(LeftColumnWidth)*/
    background: #C8FC98;
    }
    
    #crightcolumn{
    float: left;
    width: 33%; /*Width of right column in pixels*/
    background: #FDE95E;
    }
    
    #maincontainer {
    	margin: 0;
    	padding: 0;
    }
    
    </style>
    
    <script type="text/javascript">
    /*** Temporary text filler function. Remove when deploying template. ***/
    var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"]
    function filltext(words){
    for (var i=0; i<words; i++)
    document.write(gibberish[Math.floor(Math.random()*3)]+" ")
    }
    </script>
    
    </head>
    <body>
    <div id="pagewrapper">
    	<div id="topsection">
    		<div class="innertube"><h1>CSS Liquid Layout #2.1- (Fixed-Fluid)</h1>
    		</div>
    	</div>
    	<div id="contentwrapper">
    		<div id="contentcolumn">
    			<div id="maincontainer">
    				<div id="bcontentwrapper">
    					<div id="bcontentcolumn">
    						<div class="innertube"><b>Content Column: <em>Fluid</em></b> <script type="text/javascript">filltext(45)</script>
    						</div>
    					</div>
    				</div>
    				<div id="brightcolumn">
    					<div class="innertube"><b>Right Column: <em>200px</em></b> <script type="text/javascript">filltext(14)</script>
    					</div>
    				</div>
    			</div>
    			<div id="maincontainer">
    				<div id="ccontentwrapper">
    					<div id="ccontentcolumn">
    						<div class="innertube"><b>Content Column: <em>Fluid</em></b> <script type="text/javascript">filltext(45)</script>
    						</div>
    					</div>
    				</div>
    				<div id="cleftcolumn">
    					<div class="innertube"><b>Left Column: <em>20%</em></b> <script type="text/javascript">filltext(20)</script>
    					</div>
    				</div>
    				<div id="crightcolumn">
    					<div class="innertube"><b>Right Column: <em>180px</em></b> <script type="text/javascript">filltext(15)</script>
    					</div>
    				</div>
    			</div>
    		</div>
    	</div>
    	<div id="leftcolumn">
    		<div class="innertube"><b>Left Column: <em>200px</em></b> <script type="text/javascript">filltext(15)</script>
    		</div>
    	</div>
    	<div id="footer"><a href="http://www.dynamicdrive.com/style/">Dynamic Drive CSS Library</a>
    	</div>
    </div>
    </body>
    </html>
    Your help in teaching me by advising what I have done wrong so I can understand it and learn from it will be appreciated.

    Cheers

  2. #2
    Join Date
    Mar 2005
    Location
    Western Australia
    Posts
    148
    Thanks
    24
    Thanked 4 Times in 4 Posts

    Default

    Ok got a work around by setting actual widths and all is swell, however if anyone has a way to do the above all fluid please let me know.

    Thanks

Bookmarks

Posting Permissions

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