[SOLVED] Cross browser alignment

This is a discussion on "[SOLVED] Cross browser alignment" within the Starting Out section. This forum, and the thread "[SOLVED] Cross browser alignment are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 5th, 2007, 10:33
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Cross browser alignment

Having some problems getting my page to align properly in firefox and IE 6.0. Here is my code, any suggestions on improvement and getting the alignment right will be greatly appreciated:

Code: Select all
<!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>Buy a business</title>
<style type="text/css">
<!--
body {
    margin: 0;
    padding: 0;
}
#container {
    width: 996px; /*your container div width*/
    margin: 0 auto; /*this is the magic word to center your div in the center(horizontal) of your screen*/
}
#header {
    width: auto;
    height: 140px;
}
#left_container {
    float: left;
    width: 195px;
    height: 800px;
    margin: 5px 0px 5px 0;
}
#centre_container {
    margin: 5px 200px;
    width: auto;
    height: 800px; /*set this to auto if you want the height depends on the content*/
    }
#right_container {
    margin: 5px 0 5px 5px;
    float: right;
    width: 195px;
    height: 800px;
  
}
#footer {
    height: 170px;
    width: auto;
    clear: both;
   
}
#buy_but {
 position: relative;
 width   :auto;
 height  :auto;
 left    :0px;
 top     :50px;
}
#logo {
    position:relative;
 height  : auto;
 width   : auto;
 left    :343px;
 top     :-40px;
 }
#subnav {
    position:relative;
 height  :auto;
 width   :auto;
 top     :0px;
 left    :-1px;
 }
 
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  
  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
  var d=document; 
  if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
  for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; 
  d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('Images/Franchise_nav_but_mouseover.gif','Images/Broker_nav_mouseover.gif','Images/myaccount_nav_mouseover.gif','Images/faq_nav_but_mouseover.gif','Images/about_nav_but_mousover.gif','Images/Contact_nav_but_mouseover.gif')">
<div id="container">
    <div id="header">
      <div id="buy_but">
     <img src="Images/buy_nav_but3.gif" alt="Buy a business" width="117" height="47" longdesc="Images/buy_nav_but3.gif"/><a href="seller_home_test.html"               onmouseover "MM_swapImage ('Sell_but','','Images/Sell_nav_but_mouseover.gif',1)"><img src="Images/Sell_nav_but.gif" alt="Sell my business" name=               "Sell_but" width="117" height="47" border="0" id="Sel_but" /></a><a href="Franchise_home.html" onmouseout="MM_swapImgRestore()" onmouseover=               "MM_swapImage('franchise_but','','Images/Franchise_nav_but_mouseover.gif',1)"><img src="Images/franchise_nav_but.gif" alt="Buy a franchise" name=               "franchise_but" width="117" height="47" border="0" id="franchise_but" /></a><a href="broker_home.html" onmouseout="MM_swapImgRestore()" onmouseover=               "MM_swapImage('broker_but','','Images/Broker_nav_mouseover.gif',1)"><img src="Images/broker_nav_but.gif" alt="Buy and Sell businesses" name="broker_but"                width="118" height="47" border="0" id="broker_but" /></a><img src="Images/nav_middle_spacer.gif"/><a href="My_account.html" onmouseout               "MM_swapImgRestore()" onmouseover="MM_swapImage('My_Account_but','','Images/myaccount_nav_mouseover.gif',1)"><img src="Images/myaccount_nav_but.gif" alt=               "Login to access your account " name="My_Account_but" width="118" height="47" border="0" id="My_Account_but" /></a><a href="FAQ_home.html" onmouseout=               "MM_swapImgRestore()" onmouseover="MM_swapImage('FAQ_but','','Images/faq_nav_but_mouseover.gif',1)"><img src="Images/faq_nav_but.gif" alt="Frequently                asked Questions" name="FAQ_but" width="117" height="47" border="0" id="FAQ_but" /></a><a href="About_home.html" onmouseout="MM_swapImgRestore()"                onmouseover="MM_swapImage('About_but','','Images/about_nav_but_mousover.gif',1)"><img src="Images/about_nav_but.gif" alt="A little bit about us" name                ="About_but" width="117" height="47" border="0" id="About_but" /></a><a href="Contact_home.html" onmouseout="MM_swapImgRestore()" onmouseover=               "MM_swapImage('Contact_but','','Images/Contact_nav_but_mouseover.gif',1)"><img src="Images/contact_nav_but.gif" alt="Get in touch with us!" name=               "Contact_but" width="116" height="47" border="0" id="Contact_but" /></a> </div>
    <div id="logo"><img src="Images/logo_transparent background copy.gif" /></div>
    <div id="subnav"><img src="Images/buy_nav_panel2.gif"/>
    </div>
    
    </div>
    <div id="left_container"></div>
    <div id="right_container"></div>
    <div id="centre_container">
           
    </div>        
    <div id="footer" >Footer</div>
</div>
</body>
</html>
Reply With Quote

  #2 (permalink)  
Old Nov 5th, 2007, 10:39
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Hi ...
A couple of things... can you post a link to the site so we can see it, secondly what is the problem?

At least a screenshot of it will be necessary to get assistance because the code doesn't really tell us what it's supposed to look like..
Reply With Quote
  #3 (permalink)  
Old Nov 12th, 2007, 03:50
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Hi There

Sorry for the delay but I've been having a few problems getting hosting but they're sorted out now. I've managed to avoid most cross browser problems by doing a browser detect before loading the relevent homepage.

But now I cant seem to get my forms to align properly. There isn't a form handeling script yet and at the moment its all just visual but they don't want to respond to the style sheets.
Here is the screenshot: homepage_image.jpg

The link is :
http://rosswmail.3host.biz

Any help or critic will be apreciated
Reply With Quote
  #4 (permalink)  
Old Nov 12th, 2007, 03:54
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

The link doesn't work. It returns a 404. Make sure you posted it correctly...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #5 (permalink)  
Old Nov 12th, 2007, 03:57
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

try rosswmail.3host.biz/index.html or http://rosswmail.3host.biz/Netscape/ns_version2.htm
Reply With Quote
  #6 (permalink)  
Old Nov 12th, 2007, 04:08
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Nope, both don't work :: 404. Are you sure you uploaded everything correctly?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #7 (permalink)  
Old Nov 12th, 2007, 04:24
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

I'm such a dumbass, been typing it wrong the whole time! its http://rwithers.3host.biz/Netscape/ns_version2.html. I havent spent much time on checking its compatibility in IE but if you have Netscape or firefox it should come out more as I intended.
Reply With Quote
  #8 (permalink)  
Old Nov 12th, 2007, 04:33
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

here is a better screenshot http://rwithers.3host.biz/Images/homepage_image.gif
Reply With Quote
  #9 (permalink)  
Old Nov 12th, 2007, 08:39
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

You have 47 XHTML errors.

Before you start blaming the browser, fix your duff code.
Reply With Quote
  #10 (permalink)  
Old Nov 12th, 2007, 15:14
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Yes, fix your code! The screenshot link, by the way, returns a 403 (forbidden).
Now to critique... Your page takes much too long to load! Try reducing image size a little...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #11 (permalink)  
Old Nov 13th, 2007, 03:14
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Hey, sorry for all the muck ups. The code has been fixed but there are still three errors because my host ads on a script tag for the google urchin after my closing html tags.

The screenshot is at http://rwithers.3host.biz/home. Should definately work now.

Will reduce image sizes today.

Thanx alot for you patience guys.
Reply With Quote
  #12 (permalink)  
Old Nov 13th, 2007, 12:44
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Screenshot still does not work...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #13 (permalink)  
Old Nov 14th, 2007, 04:07
Junior Member
Join Date: Oct 2007
Location: London
Age: 24
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Cross browser alignment

Screenshot works no problem on my computer when I click the link on the forum. Anyway I sorted the form out. Thanx for the help guys
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross Browser Problems - Need Help dramaticr21 Starting Out 3 May 4th, 2008 09:59
Cross Browser issues. Destx Web Page Design 5 Mar 26th, 2007 18:56
Cross-Browser difficulties... Dapandyman Web Page Design 6 Dec 9th, 2006 20:53
New Cross-Browser Low masonbarge JavaScript Forum 2 May 11th, 2006 17:18
Cross Browser jwalker80 Web Page Design 10 Dec 22nd, 2005 14:38


All times are GMT. The time now is 05:26.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43