Jump to content

Layout of my intranet website was change when I access it on different computers

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts
Good day!
I created my website on my computer and now I put it on my testing server and I found out that the size background of my website was change even I used those css code:

<style type="text/css">

html,body{

overflow:hidden;

}

BODY {

background-image: url(bground.png);

background-attachment: fixed;

}

</style>

 
I used those codes to fixed the background but my problem is the background was doubled the image although it is fixed. Not only was the background change also the content of my website was dislocated. I want is only one output should be display in all computers.

It is possible that my website display should be dependent on the browser or the settings of the computer? So those in all computers the display of my website are all the same like what I browse in the internet?

On my used computers my website display is good, but when I try to other computers it was display not so good I don’t know why. I need to fix it now because all the staff wants to see my website… I hope you can help me…
Thank you

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
I am not sure if you should place an overflow and fixed on it, what I normally do is place the background image in <body> with no-repeat
body {
   background-image:url('bground.png');
   background-repeat:no-repeat;
} 

I am not sure on what to suggest though, as I you have no example
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts

Nullw0rm said:

I am not sure if you should place an overflow and fixed on it, what I normally do is place the background image in <body>
<script type="text/javascript"><!--
var _gaq = _gaq || [];
_gaq.push(
['_setDomainName', '.codecall.net'],
['_setAccount', 'UA-17086927-1'],
['_trackPageview']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//-->
</script>
with no-repeat
body {

   background-image:url('bground.png');

   background-repeat:no-repeat;

} 

I am not sure on what to suggest though, as I you have no example

here is my html and css codes:

<!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=iso-8859-1" />

<title>Company</title>

<style type="text/css"> 

html,body{

overflow:hidden;

}

BODY { 

background-image: url(bground.png);

background-attachment: fixed; 

} 

--> 

</style>


<style type="text/css">


#ddcolortabs{

margin-left: 2px;

padding: 0;

width: 100%;

background: transparent;

voice-family: "\"}\"";

voice-family: inherit;

padding-left: 2px;

}


#ddcolortabs ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#ddcolortabs li{

display:inline;

margin:0 2px 0 0;

padding:0;

text-transform:uppercase;

}


#ddcolortabs a{

float:right;

color: white;

background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;

margin:115px 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#ddcolortabs a span{

float:right;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:6px 9px 2px 6px;

}


#ddcolortabs a span{

float:none;

}


#ddcolortabs a:hover{

background-color: #678b3f;

}


#ddcolortabs a:hover span{

background-color: #678b3f ;

}


#ddcolortabs #current a, #ddcolortabs #current span{ /*currently selected tab*/

background-color: #678b3f;

}

</style>


<style type="text/css">


#Layer1_background_green {

	position:absolute;

	width:980px;

	height:392px;

	z-index:1;

	top: 149px;

	left: 0px;

}

#Layer1_vertical_line {

	position:absolute;

	width:3px;

	height:387px;

	z-index:2;

	left: 170px;

	top: 153px;

}

#Layer4_horizontal_line {

	position:absolute;

	width:980px;

	height:5px;

	z-index:3;

	left: 0px;

	top: 150px;

}

#visionmission_flash {

	position:absolute;

	width:644px;

	height:404px;

	z-index:5;

	left: 270px;

	top: 156px;

}

#green_frame {

	position:absolute;

	width:172px;

	height:385px;

	z-index:6;

	left: 0px;

	top: 156px;

}

#nav_vertical {

	position:absolute;

	width:165px;

	height:111px;

	z-index:7;

	left: 10px;

	top: 363px;

}


#nav_vertical ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#nav_vertical li{

display:inline;

margin:0 0 0 0;

padding:0;

text-transform:uppercase;

}



#nav_vertical a{

float:left;

color: green;

/*background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;*/

margin:0 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#nav_vertical a span{

float:left;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:9px 9px 2px 6px;

}



#nav_vertical a:hover{

color:#00CC00;

}


#nav_vertical a:hover span{

color: #00CC00 ;

}


#nav_vertical #current a, #nav_vertical #current span{ /*currently selected tab*/

/*background-color: #678b3f; */

color:#FFFFFF

}

#ds {

	position:absolute;

	width:73px;

	height:72px;

	z-index:8;

	left: 0px;

	top: 160px;

}

</style>

</head>

<body>

<div id="visionmission_flash">

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="650" height="406">

    <param name="movie" value="VISION_MISSION.swf" />

    <param name="quality" value="high" />

	<param name="wmode" value="transparent"/>

    <embed src="VISION_MISSION.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="406" wmode="transparent"></embed>

  </object>

</div>

<form id="form1" name="form1" method="post" action="">

 <div id="ddcolortabs">

<ul>

<li><a href="products.php" title="Products" target="_self"><span>Products</span></a></li>

<li><a href="event.php" title="Events" target="_self"><span>Events</span></a></li>

<li style="margin-left: 1px" id="current"><a href="company.php" title="Company" target="_self"><span>Company</span></a></li>

</ul>

</div>

<div id="ddcolortabsline"></div>

<div id="Layer1_background_green"><img src="layout_image/LINE.png" width="1020" height="417" /></div>

<div id="Layer4_horizontal_line"><img src="layout_image/horizontal_line.png" width="1020" height="5" /></div>

</form>

<div id="green_frame"><img src="layout_image/vertical left v01.jpg" width="174" height="410" /></div>

<div id="nav_vertical">

<ul>

<li id="current"><a href="visionmission.php" title="VISION AND MISSION" target="_self"><span>VISION AND MISSION</span></a></li>

<li><a href="qualitypolicy.php" title="QUALITY POLICY" target="_self"><span>QUALITY POLICY</span></a></li>

<li><a href="values.php" title="VALUES" target="_self"><span>VALUES</span></a></li>

</ul>

</div>

<div id="ds"><a href="company.php"><img src="layout_image/ds.png" width="170" height="200" border="0" /></a></div>

</body>

</html>


Thank you

#4
ethikz

ethikz

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
Hmm well I would make the change to use % instead of px. Each computer has different displays and uses different browsers. When using percent it relatively stays the same versus using px

#5
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts

ethikz said:

Hmm well I would make the change to use % instead of px. Each computer has different displays and uses different browsers. When using percent it relatively stays the same versus using px

where i used percent?

#6
ethikz

ethikz

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
You didn't I was saying to use it instead of px..

#7
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts

ethikz said:

You didn't I was saying to use it instead of px..

I used percent but nothing change

#8
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts
Good day!
I research on internet about auto fit of website or adapting the resolution of the monitor or screen of computer, but I can’t find the solution. I want is in any settings/resolution/size of monitor my website appearance was not change. Because now I got a problem that I can’t upload my website in a server because I notice that in other computer my website display was change or change the location of the content of my website, After I noticed that the background was doubled I put the background no repeat and after that on the below of webpage I see a white color.

Here is my css codes:

<style type="text/css"> 

html,body{

overflow:hidden;

}

BODY { 

background-image: url(layout_image/bgroundv09.png);

background-attachment: fixed; 

} 

--> 

</style>


<style type="text/css">


#ddcolortabs{

margin-left: 2px;

padding: 0;

width: 100%;

background: transparent;

voice-family: "\"}\"";

voice-family: inherit;

padding-left: 2px;

}


#ddcolortabs ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#ddcolortabs li{

display:inline;

margin:0 2px 0 0;

padding:0;

text-transform:uppercase;

}


#ddcolortabs a{

float:right;

color: white;

background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;

margin:115px 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#ddcolortabs a span{

float:right;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:6px 9px 2px 6px;

}


#ddcolortabs a span{

float:none;

}


#ddcolortabs a:hover{

background-color: #678b3f;

}


#ddcolortabs a:hover span{

background-color: #678b3f ;

}


#ddcolortabs #current a, #ddcolortabs #current span{ /*currently selected tab*/

background-color: #678b3f;

}

</style>

<style type="text/css">


#Layer1_background_green {

	position:absolute;

	width:980px;

	height:392px;

	z-index:1;

	top: 149px;

	left: 0px;

}

#Layer1_vertical_line {

	position:absolute;

	width:3px;

	height:387px;

	z-index:2;

	left: 170px;

	top: 153px;

}

#Layer4_horizontal_line {

	position:absolute;

	width:980px;

	height:5px;

	z-index:3;

	left: 0px;

	top: 150px;

}

#visionmission_flash {

	position:absolute;

	width:644px;

	height:404px;

	z-index:5;

	left: 270px;

	top: 156px;

}

#green_frame {

	position:absolute;

	width:172px;

	height:385px;

	z-index:6;

	left: 0px;

	top: 156px;

}

#nav_vertical {

	position:absolute;

	width:165px;

	height:111px;

	z-index:7;

	left: 10px;

	top: 363px;

}


#nav_vertical ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#nav_vertical li{

display:inline;

margin:0 0 0 0;

padding:0;

text-transform:uppercase;

}



#nav_vertical a{

float:left;

color: green;

/*background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;*/

margin:0 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#nav_vertical a span{

float:left;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:9px 9px 2px 6px;

}



#nav_vertical a:hover{

color:#00CC00;

}


#nav_vertical a:hover span{

color: #00CC00 ;

}


#nav_vertical #current a, #nav_vertical #current span{ /*currently selected tab*/

/*background-color: #678b3f; */

color:#FFFFFF

}

#ds {

	position:absolute;

	width:73px;

	height:72px;

	z-index:8;

	left: 0px;

	top: 160px;

}

</style>


Thank you….

#9
ethikz

ethikz

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
do you have a link to the site or is it local? I am asking so I can copy all css and html code and duplicate it to see where the problem exists

#10
newphpcoder

newphpcoder

    Programming Professional

  • Members
  • PipPipPipPipPipPip
  • 477 posts

ethikz said:

do you have a link to the site or is it local? I am asking so I can copy all css and html code and duplicate it to see where the problem exists

Is it in local only...here is the full css and html codes:

<!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=iso-8859-1" />

<title>Company</title>

<style type="text/css"> 

html,body{

overflow:hidden;

}

BODY { 

background-image: url(layout_image/bgroundv09.png);

background-attachment: fixed; 

background-repeat: no-repeat;

} 

--> 

</style>


<style type="text/css">


#ddcolortabs{

margin-left: 2px;

padding: 0;

width: 100%;

background: transparent;

voice-family: "\"}\"";

voice-family: inherit;

padding-left: 2px;

}


#ddcolortabs ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#ddcolortabs li{

display:inline;

margin:0 2px 0 0;

padding:0;

text-transform:uppercase;

}


#ddcolortabs a{

float:right;

color: white;

background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;

margin:115px 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#ddcolortabs a span{

float:right;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:6px 9px 2px 6px;

}


#ddcolortabs a span{

float:none;

}


#ddcolortabs a:hover{

background-color: #678b3f;

}


#ddcolortabs a:hover span{

background-color: #678b3f ;

}


#ddcolortabs #current a, #ddcolortabs #current span{ /*currently selected tab*/

background-color: #678b3f;

}

</style>


<style type="text/css">


#Layer1_background_green {

	position:absolute;

	width:980px;

	height:392px;

	z-index:1;

	top: 149px;

	left: 0px;

}

#Layer1_vertical_line {

	position:absolute;

	width:3px;

	height:387px;

	z-index:2;

	left: 170px;

	top: 153px;

}

#Layer4_horizontal_line {

	position:absolute;

	width:980px;

	height:5px;

	z-index:3;

	left: 0px;

	top: 150px;

}

#visionmission_flash {

	position:absolute;

	width:644px;

	height:404px;

	z-index:5;

	left: 270px;

	top: 156px;

}

#green_frame {

	position:absolute;

	width:172px;

	height:385px;

	z-index:6;

	left: 0px;

	top: 156px;

}

#nav_vertical {

	position:absolute;

	width:165px;

	height:111px;

	z-index:7;

	left: 10px;

	top: 363px;

}


#nav_vertical ul{

font: bold 12px Arial, Verdana, sans-serif;

margin:0;

padding:0;

list-style:none;

}


#nav_vertical li{

display:inline;

margin:0 0 0 0;

padding:0;

text-transform:uppercase;

}



#nav_vertical a{

float:left;

color: green;

/*background: #8cb85c url(layout_image/color_tabs_left.gif) no-repeat left top;*/

margin:0 2px 0 0;

padding:0 0 1px 3px;

text-decoration:none;

letter-spacing: 1px;

}


#nav_vertical a span{

float:left;

display:block;

/*background: transparent url(layout_image/color_tabs_right.gif) no-repeat right top;*/

padding:9px 9px 2px 6px;

}



#nav_vertical a:hover{

color:#00CC00;

}


#nav_vertical a:hover span{

color: #00CC00 ;

}


#nav_vertical #current a, #nav_vertical #current span{ /*currently selected tab*/

/*background-color: #678b3f; */

color:#FFFFFF

}

#ds {

	position:absolute;

	width:73px;

	height:72px;

	z-index:8;

	left: 0px;

	top: 160px;

}

</style>

</head>

<body>

<div id="visionmission_flash">

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="650" height="406">

    <param name="movie" value="VISION_MISSION.swf" />

    <param name="quality" value="high" />

	<param name="wmode" value="transparent"/>

    <embed src="VISION_MISSION.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="406" wmode="transparent"></embed>

  </object>

</div>

<form id="form1" name="form1" method="post" action="">

 <div id="ddcolortabs">

<ul>

<li><a href="products.php" title="Products" target="_self"><span>Products</span></a></li>

<li><a href="event.php" title="Events" target="_self"><span>Events</span></a></li>

<li style="margin-left: 1px" id="current"><a href="company.php" title="Company" target="_self"><span>Company</span></a></li>

</ul>

</div>

<div id="ddcolortabsline"></div>

<div id="Layer1_background_green"><img src="layout_image/LINE.png" width="1020" height="417" /></div>

<div id="Layer4_horizontal_line"><img src="layout_image/horizontal_line.png" width="1020" height="5" /></div>

</form>

<div id="green_frame"><img src="layout_image/vertical left v01.jpg" width="174" height="410" /></div>

<div id="nav_vertical">

<ul>

<li id="current"><a href="visionmission.php" title="VISION AND MISSION" target="_self"><span>VISION AND MISSION</span></a></li>

<li><a href="qualitypolicy.php" title="QUALITY POLICY" target="_self"><span>QUALITY POLICY</span></a></li>

<li><a href="values.php" title="VALUES" target="_self"><span>DSPI VALUES</span></a></li>

</ul>

</div>

<div id="ds"><a href="company.php"><img src="layout_image/ds.png" width="170" height="200" border="0" /></a></div>

</body>

</html>


I used MAcromedia Dreamweaver so that the css codes is automatically coded

Thank you

#11
ethikz

ethikz

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
oh yeah can you upload all the images...forgot to mention that