Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | php webpages i made do not open in internet explorer - help plz

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

A little help with my website
Reply
 
Thread Tools
Old 29-07-2004, 12:31   #1
eddie00001
Inactive
 
eddie00001's Avatar
 
Join Date: Jun 2003
Location: Newport
Age: 49
Services: Sky Broadband Sky HD
Posts: 477
eddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation era
Post A little help with my website

Hello all,

Just looking for a little help with my website

I know some of the links are not working, but I'll get around to that later. What I need to know is how I can get everything centred within the browser, and also keep everything in proportion on different displays. Currently the page looks fins on my display (monitor currently at 1280x1024).

The site has been put together in Dreamweaver with use of parts of a template.
eddie00001 is offline   Reply With Quote
Advertisement
Old 29-07-2004, 13:10   #2
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: A little help with my website

Centering layers is a b*stard.

This works however:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script>
function Is() {
    agent  = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns    = ((agent.indexOf('mozilla')   !=   -1) && ((agent.indexOf('spoofer')   ==   -1) && (agent.indexOf('compatible') ==   -1)));
    this.ns4   = (this.ns && (this.major      ==    4));
    this.ns6   = (this.ns && (this.major      >=    5));
    this.ie    = (agent.indexOf("msie")       !=   -1);
    this.ie3   = (this.ie && (this.major      < 4));
    this.ie4   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   ==   -1));
    this.ie5   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   !=   -1));
    this.ie55  = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.5")   !=   -1));
    this.ie6  = (this.ie && (agent.indexOf("msie 6.0")!=-1) );
}

var is = new Is();

function layerObject(id,position,left,top,visibility) {
if (is.ie5|| is.ie55||is.ie6|| is.ns6){
this.obj = document.getElementById(id).style;
this.obj.position = position;
this.obj.left = left;
this.obj.top = top;
this.obj.visibility = visibility;
return this.obj;
}
}
function layerSetup() {
centerLyr = new layerObject('centerLayer','absolute', page_width/2-100,page_height/2-12,'visible');
}
</script>
<style type="text/css">
<!--
.main { 
font-family: Georgia, "Times New Roman", Times, serif; 
font-size: 16px; 
color: #FBEED5; 
text-decoration: none
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FFFFFF;
}
-->
</style> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body onLoad="
if(is.ns6) {
page_width=innerWidth;
page_height=innerHeight;
layerSetup();
} else if(is.ie5 || is.ie55 ||is.ie6) {
page_width=document.body.clientWidth;
page_height=document.body.clientHeight;
layerSetup();
}"
onResize=" history.go(0); ">
<div id="centerLayer" style="position: absolute; width:200px; height:24px; left: 0px; top: 0px; z-index: 6; visibility: hidden;"> 
  <div align="center">centered layer
  </div>
</div>
</body>
</html>
Note, it won't show up centered in Dreamweaver but will in a browser.
Bifta is offline   Reply With Quote
Old 29-07-2004, 14:24   #3
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: A little help with my website

If you want to center a <div> all you need to do is this CSS:

#centerlayer {
width: 75%; /* Example width */
margin-left: auto;
margin-right: auto;
}

I usually find that this is useful for browsers with good CSS support, I used it on the nthellworld.co.uk homepage:

body {
max-width: 1024px; /* IE doesn't support advanced CSS so this will not work in that browser */
margin-left: auto;
margin-right: auto;
}
Richard M is offline   Reply With Quote
Old 29-07-2004, 15:40   #4
eddie00001
Inactive
 
eddie00001's Avatar
 
Join Date: Jun 2003
Location: Newport
Age: 49
Services: Sky Broadband Sky HD
Posts: 477
eddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation eraeddie00001 has entered a golden reputation era
Re: A little help with my website

Thanks for the advice, something for me to work on later
eddie00001 is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:43.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum