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 8 of 8

Thread: IE7 layout

  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    IE7 layout

    Hi there,

    I'm relatively new to web design and I'm trying to get the layout for my site sorted in IE7. It looks fine in Chrome, Safari, IE8/9 but the layout goes astray in IE7 and IE6. I only realised when I looked at the site on a PC with XP and IE7. The site is not live as yet. In IE7 the left, middle and right columns overlap and it looks a mess.

    I am also having problems with the DOCTYPE I think - which one should I be using?!

    Any help appreciated in advance. And does anybody know I good way to cross browser test that is free? I would never have noticed my problem in IE7 unless I hadn't copied the site onto another PC.

    Anyway, the code can be seen below. Many thanks in advance for your help!

    Code:
    HTML
    
    <!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" lang="en" xml:lang="en">
    <head>
    	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    	<meta name="description" content="Acorn Ironmongery, or Acorn Arhcitectural Ironmongery, are providers of top quality door furniture and window furniture for builders and homeowners. We have a huge array of products in stock, including door handles, door locks, door hinges, kitchen fittings, cupboards handles and much much more. Acorn Ironmongery Farnham have a knowledgeable team of staff who will be able to help you with all your ironmongery needs." />
    	<meta name="keywords" content="Acorn Ironmongery, Acorn Architectural Ironmongery, Ironmongery in Farnham, Farnham ironmongery, Acorn Ironmongery Cambridge, Ironmongrey in South East, ironmongery for builders, ironmongery for tradesmen, trade ironmongery, ironmongery for the trade, ironmongery acorn, acorn ironmongers, acorn architectural, ironmongery showrooms Farnham, ironmongery showrooms South East, ironmongery England, ironmongery Surrey, Surrey ironmongery, Hampshire ironmongery, ironmongery in Hampshire" />
    	<meta name="author" content="www.acornfarnham.co.uk" />
        <meta name="generator" content="html, css, javascript" />
    	<link rel="stylesheet" type="text/css" href="acorn.css" media="screen,projection" />
    	<title>Acorn Ironmongery Contact</title>
        
        <script type="text/javascript" src="js/prototype.js"></script>
        <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
        <script type="text/javascript" src="js/lightbox.js"></script>
        
    </head>
    
    <body>
    
    <div id="container">
    	<div id="header">
        <p><a href="contact.html">Contact</a> | <a href="site_map">Site Map</a> | <a href="images/acorn_map_large_2.jpg" rel="lightbox[map]" title="Map to Acorn Ironmongery">Opening Hours</a></p>
        
    		<img src="header_4.png" />
    	</div>
    	
        <div>
        <ul id="topnav">
        <li><a href="index.html">Home</a></li>
        <li>
            <a href="contact.html">About</a>
            <!--Subnav Starts Here-->
            <span>
                <a href="history.html">History</a> |
                <a href="map.html">Map</a> |
                <a href="staff.html">Staff</a> |
                <a href="gallery.html">Gallery</a> |
            </span>
            <!--Subnav Ends Here-->
        </li>
        <li><a href="contact.html">Brands</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="hafele.html">Hafele</a> |
                <a href="hettich.html">Hettich</a> |
                <a href="carlisle_brass.html">Carlisle Brass</a> |
                <a href="frank_allart.html">Frank Allart</a> |
                <a href="pro_decor.html">Pro Decor</a> |
                <a href="blum.html">Blum</a> |
                <a href="kirkpatrick.html">Kirkpatrick</a> |
                <a href="frelan.html">Frelan</a> |
                <a href="aldridge.html">Aldridge</a> |
                <a href="simonswerk.html">Simonswerk</a> |
                <a href="karcher.html">Karcher</a> |
                <a href="finesse_design.html">Finesse Design</a> |
                <a href="geze.html">Geze</a> |
                <a href="turnstyle_designs.html">Turnstyle Designs</a> |
                <a href="from_the_anvil.html">From the Anvil</a> |
                <a href="strand_hardware.html">Strand Hardware</a> |
                <a href="samuel_heath.html">Samuel Heath</a> |
                <a href="ingersol_rand.html">Ingersoll Rand</a> |
                <a href="astroflame.html">Astroflame</a> |
                <a href="clayton_monroe.html">Clayton Monroe</a> |
               
            </span>
            <!--Subnav Ends Here-->
        </li>
        
        <li><a href="contact.html">Ironmongery</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="hinges.html">Hinges</a> |
                <a href="locks.html">Locks</a> |
                <a href="door_closers.html">Door Closers</a> |
                <a href="external_door_furniture.html">External Door Furniture</a> |
                <a href="commercial_fittings.html">Commercial Fittings</a> 
            </span>
            <!--Subnav Ends Here-->
        </li>
        
          <li><a href="contact.html">Door Handles</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="door_handles_rose.html">Door Handles on Rose</a> |
                <a href="door_handles_backplate.html">Door Handles on Backplate</a> |
                <a href="commercial_door_handles.html">Commercial Door Handles</a> 
            </span>
            <!--Subnav Ends Here-->
        </li>
        
        <li><a href="contact.html">Doors</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="external_doors.html">External Doors</a> |
                <a href="internal_doors.html">Internal Doors</a> |
                <a href="fire_doors.html">Fire Doors</a> 
            </span>
            <!--Subnav Ends Here-->
        </li>
        
        <li><a href="contact.html">Windows</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="sash_fittings.html">Sash Fittings</a> |
                <a href="casement_fittings.html">Casement Fittings</a> |
                <a href="french_windows.html">French Windows</a> 
            </span>
            <!--Subnav Ends Here-->
        </li>
        
        <li><a href="contact.html">Furniture Fittings</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="kitchen_hinges.html">Kitchen Hinges</a> |
                <a href="drawer_runners.html">Drawer Runners</a> |
                <a href="kitchen_handles.html">Kitchen Handles</a> |
                <a href="kitchen_storage.html">Kitchen Storage</a> |
                <a href="bedroom_storage.html">Bedroom Storage</a>
            </span>
            <!--Subnav Ends Here-->
        </li>
        
         <li><a href="contact.html">Sectors</a>
        	<!--Subnav Starts Here-->
            <span>
                <a href="residential.html">Residential</a> |
                <a href="commercial.html">Commercial</a> |
                <a href="retail.html">Retail</a>  |
                <a href="office.html">Office</a>  
            </span>
            <!--Subnav Ends Here-->
        </li>
    </ul>
    </div>
        
    <br />
    	<div id="content-container1">
    		<div id="content-container2">
    			<div id="sidebar">
    		<ul class="sidemenu">
            <h2>What We Do</h2>
    			<li><a href="services.html"><b>Services <small>>></small></b></a></li>  
                <ul class="vmenu">
    				<li><a href="services.html">Scheduling</a></li>  
    				<li><a href="services.html">Site Visits</a></li>
                    <li><a href="services.html">Technical Advice</a></li>
    				<li><a href="services.html">Trade</a></li>
                    <li><a href="services.html">Delivery</a></li>
                </ul>
    			<li><a href="brochures.html"><b>Brochure PDFs <small>>></small></b></a></li> 
                <li><a href="videos.html"><b>Video Tutorials <small>>></small></b></a></li> 
                <li><a href="contact.html"><b>Buyer Guides <small>>></small></b></a></li>
                <ul class="vmenu">
    				<li><a href="traditional_home_decor.html">Traditional Home Decor</a></li>  
    				<li><a href="contemporary_styles.html">Contemporary Styles</a></li>
                    <li><a href="interior_handles.html">Interior Handles and Knobs</a></li>
    				<li><a href="exterior_handles.html">Exterior Handles and Knobs</a></li>
                    <li><a href="door_locks_security.html">Door Locks and Security</a></li>
                    <li><a href="light_switches_sockets.html">Light Switches and Sockets</a></li>
                    <li><a href="builders_ironmongery.html">Builder's Ironmongery</a></li>
                    <li><a href="materials_finishes.html">Materials and Finishes</a></li>
                    <li><a href="cabinet_handles_knobs.html">Cabinet Handles and Knobs</a></li>
                </ul>
                <li><a href="handy_hints_tips.html"><b>Handy Hints and Tips <small>>></small></b></a></li>
                <li><a href="glossary.html"><b>Glossary <small>>></small></b></a></li>
                <li><a href="news.html"><b>News <small>>></small></b></a></li>
                <li><a href="testimonials.html"><b>Testimonials <small>>></small></b></a></li>
                <li><a href="site_map.html"><b>Site Map <small>>></small></a></b></li>
                <li><a href="contact.html"><b>Contact <small>>></small></a></b></li></div>
    
    <div id="content">
    
    <h2>Contact</h2>
    <p>
    
    
    </p>
          
    </div>
                
                
    <div id="aside">
    
    <h2>Map</h2>
    				
    <p>Click on the map to see a larger map, opening hours and contact details <small>>></small></p>
                    
    <a href="images/acorn_map_large_2.jpg" rel="lightbox[map]" title="Map to Acorn Ironmongery"><img src="images/acorn_map.jpg" border="0"></a>
                    
    <p>Or take a look at <a href="http://maps.google.co.uk/maps?q=gu10+5dw&hl=en&sll=51.214504,-0.833422&sspn=0.008683,0.019612&vpsrc=0&hnear=Farnham+GU10+5DW,+United+Kingdom&t=m&z=16" target="_blank"><i>Acorn Ironmongery on Google Maps</i></a> and get detailed directions <small>>></small> </p>
                        
    <h2>Gallery</h2>
    
    
    <p>Click on any of thumbnails below to take a look at our showroom and warehouse <small>>></small></p>
    
    <table>
    <tr>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    </tr>
    <tr>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    <td><a href="images/gallery/blank.jpg" rel="lightbox[gallery]" title=""><img src="images/gallery/blank_thumb_2.jpg" border="0"></a></td>
    </tr>
    </table>
    <p>See more photos in our <a href="gallery.html"><i>Acorn Ironmongery Gallery</i></a></p>
    			
    </div>
                
    <div id="footer">
    				
    Copyright © Acorn Ironmongery Ltd, 2011 | Site by <a href="http://www.bangbangcreative.co.uk">Bang Bang Creative</a>
    			
    </div>
    
    		</div>
    	</div>
    </div>
    
    </body>
    </html>
    
    #
    
    #
    
    CSS:
    
    @charset "UTF-8";
    /* CSS Document */
    
    body {background-image: #fff;
    	  font-family: georgia, Helvetica, sans-serif;
     	  font-size: 15px;
          color:#333;
    	  text-align:justify;}
    
    #container
    {
    	margin: 0 auto;
    	width: 100%;
    	
    }
    
    #header
    {
    	background:;
    	padding: 10px;
    }
    
    #header h1 { margin: 0; }
    
    #header a { color:#555; padding:5px 0; margin:0; font-size:1em; border-bottom: 1px dotted #; text-decoration:none}
    
    #header a:hover {color:#069; text-decoration:none;}
    
    /*--start of top Nav--*/
    
    ul#topnav {
    	margin: 0; padding: 0;
    	float: left;
    	width: 100%;
    	list-style: none;
    	position: relative; /*--Set relative positioning on the unordered list itself - not on the list item--*/
    	font-size: 1.2em;
    	background: #1376c9 url(letter.png) repeat-x;
    }
    ul#topnav li {
    	float: left;
    	margin: 0; padding: 0;
    	border-right: ; /*--Divider for each parent level links--*/
    }
    ul#topnav li a {
    	padding: 10px 15px;
    	display: block;
    	color: #fff;
    	text-decoration: none;
    }
    ul#topnav li:hover { background: #336699 url(topnav_active.gif) repeat-x; }
    /*--Notice the hover color is on the list item itself, not on the link. This is so it can stay highlighted even when hovering over the subnav--*/
    
    ul#topnav li span {
    	float: left;
    	padding: 10px 0;
    	word-spacing:1px;
    	position: absolute;
    	left: 0; top:35px;
    	display: none; /*--Hide by default--*/
    	width: 100%;
    	background: #09F;
    	color: #fff;
    	/*--Bottom right rounded corner--*/
    	-moz-border-radius-bottomright: 5px;
    	-khtml-border-radius-bottomright: 5px;
    	-webkit-border-bottom-right-radius: 5px;
    	/*--Bottom left rounded corner--*/
    	-moz-border-radius-bottomleft: 5px;
    	-khtml-border-radius-bottomleft: 5px;
    	-webkit-border-bottom-left-radius: 5px;
    }
    ul#topnav li:hover span { display: block; } /*--Show subnav on hover--*/
    ul#topnav li span a { display: inline; } /*--Since we declared a link style on the parent list link, we will correct it back to its original state--*/
    ul#topnav li span a:hover {text-decoration: underline;}
    
    /*--end of top Nav--*/
    
    
    #content-container1
    {
    	float: left;
    	width: 100%;
    }
    
    #content-container2
    {
    	float: left;
    	width: 100%; 
    }
    
    
    /* Sidebar */
    #sidebar {width:16%; float:left; margin:1.5% 0 0 0; padding:10px; color:#333; border-righ:1px dotted #999; text-align:left;}
    #sidebar h2 {font-size:1.4em; padding: 7px; background-color:#ccc;}
    #sidebar ul {list-style:none; margin:0 0 15px 0;}
    #sidebar li {padding:10; margin:10;}
    #sidebar ul.sidemenu {width:200px; padding:0; margin:0 0 20px 15px; }
    #sidebar ul.sidemenu li a {color:#555; display:block; padding:5px 0; margin:0; font-size:1em; border-bottom: 1px dotted #; text-decoration:none}
    #sidebar ul.sidemenu li a:hover {color:#069; text-decoration:none;}
    #sidebar ul.sidemenu li a.active {color:#a13538;}
    #sidebar ul.sidemenu ul {width:180px; padding:0; margin:0 0 0 20px;}
    #sidebar ul.sidemenu ul li a {padding:2px 0; margin:0; font-size:1em;}
    
    /* Lightbox */
    #lightbox{	position: absolute;	left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
    #lightbox img{ width: auto; height: auto;}
    #lightbox a img{ border: none; }
    
    #outerImageContainer{ position: relative; background-color: #fff; width: 200px; height: 200px; margin: 0 auto; margin-top:-20px;}
    #imageContainer{ padding: 1px; }
    
    #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
    #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
    #imageContainer>#hoverNav{ left: 0;}
    #hoverNav a{ outline: none;}
    
    #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
    #prevLink { left: 0; float: left;}
    #nextLink { right: 0; float: right;}
    #prevLink:hover, #prevLink:visited:hover { background: url(Images/prevlabel.gif) left 15% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(Images/nextlabel.gif) right 15% no-repeat; }
    #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: hidden; width: 100%; }
    
    #imageData{	padding:0 10px; color: #666; }
    #imageData #imageDetails{ width: 100%; float: left; text-align: left; }	
    #imageData #caption{ font-weight: bold;	}
    #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em;	}			
    #imageData #bottomNavClose{ width: 80px; float: right;  padding-bottom: 0.7em; outline: none;}	
    #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }	
    
    /*content*/ 
    
    #content
    {
    	float: left;
    	width: 56%;
    	padding: 20px 0;
    	margin: 2% 0 0 2%;
    	
    }
    
    #content p {padding:0px;
    			color:#333;
    			text-align:justify;}
    
    #content h2 { margin:0;
    			padding:7px;
    			background-color:#ccc;
    			color:#333;}
    			
    #content h3 { font-size:20px;
    				color:#333;}
    			
    			
    #content a { color:#930; padding:5px 0; margin:0; font-size:1em; border-bottom: 1px dotted #; text-decoration:none}
    
    #content a:hover {color:#069; text-decoration:none;}
    
    #aside
    {
    	float: right;
    	width: 16%;
    	padding: 20px 0;
    	margin: 2% 4% 0 0;
    	display: inline;
    }
    
    #aside h2 { margin:0;
    			padding:7px;
    			background-color:#C33;
    			color:#fff;}
    			
    #aside p { color:#666;
    			size: 12px;}
    			
    #aside a { color:#930; padding:2px 0; margin:0; font-size:1em; border-bottom: 1px dotted #; text-decoration:none}
    
    #aside a:hover {color:#069; text-decoration:none;}
    
    #footer
    {
    	clear: both;
    	background: #ccc;
    	text-align: right;
    	padding: 20px;
    	height: 1%;
    }
    
    #footer a { color:#555; padding:5px 0; margin:0; font-size:1em; border-bottom: 1px dotted #; text-decoration:none}
    Last edited by rickles; 11-11-2011 at 06:39 PM.

  • #2
    New Coder
    Join Date
    Nov 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Apologies for long code above - thought i had to put it between # to shorten it...

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by rickles View Post
    Apologies for long code above - thought i had to put it between # to shorten it...
    Hello rickles,
    When posting code in the forum, please use the code tags, &#91;code&#93;&#91;/code&#93; - available with the # button in the post edit window.

    This will wrap your code in a scroll box which greatly helps the readability of your post.

    You can edit your original post to add them.
    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

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    It looks fine in Chrome, Safari, IE8/9 but the layout goes astray in IE7 and IE6. I only realised when I looked at the site on a PC with XP and IE7. The site is not live as yet. In IE7 the left, middle and right columns overlap and it looks a mess.
    The problem with any percentage layout is it's set pixel sized content. Without a min-width the columns can keep going smaller while the content overflows.

    IE6 min-width solution here.
    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

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    I am also having problems with the DOCTYPE I think - which one should I be using?!
    Any newly developed website should have a Strict DocType. It's up to you to choose between HTML and XHTML... see the link about DocTypes in my signature line for help choosing.

    There's nothing wrong with the XHTML 1.0 STRICT that your using.

    Something that will help you write code that works with that DocType is the validator. See the links in my signature about validating.
    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

  • #6
    New Coder
    Join Date
    Nov 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Excavator,

    Thanks so much for your quick response. So if I do something like the below then it should fix the problem with any divs with a percentage width?

    #content-container1
    {
    float: left;
    width: 100%;
    non-width: 400px;
    }

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by rickles View Post
    #content-container1
    {
    float: left;
    width: 100%;
    non-width: 400px;
    }
    Property non-width doesn't exist, min-width: 400px; would keep #content-container1 from going narrower than 400px.
    It would not affect any other elements.
    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

  • #8
    New Coder
    Join Date
    Nov 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Excavator,

    Sorry I did mean min-width - my head is fried!

    Thanks, looks like this might have worked. Just need to test it in IE7. What do you do for cross-browser testing? I work on a macbook pro and am thinking of getting Parallel, which allows me to test in windows on a mac.

    Many thanks

    Rickles


  •  

    Posting Permissions

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