Register for your free account! | Forgot your password?

You last visited: Today at 21:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Site Centering

Discussion on Site Centering within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Site Centering

May I get any help on site centering? I have made a site in PHP , but it seems like it doesnt suit all resolutions.Well I mean that it looks fine on my 22" screen , but once I open it on my laptop its total ****.Any help on doing that?
damianpesta is offline  
Old 08/01/2009, 12:54   #2
 
elite*gold: 0
Join Date: Jan 2006
Posts: 98
Received Thanks: 5
just rewrite in a lower resolution? or make a imageless site so u can us it on every solution with a simple script
SchnorrerKing is offline  
Old 08/01/2009, 13:20   #3
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Firstivall how do you set a resolution, I am not using any images for my website.But I still have to scroll right when I want to see something on the right side of the website.
damianpesta is offline  
Old 08/01/2009, 16:43   #4
 
elite*gold: 0
Join Date: Mar 2008
Posts: 55
Received Thanks: 4
Code:
<html>
<head>
<style>
#wrapper { width:1000px; margin: auto; }
</head>
<body>
<div id="wrapper">
&nbsp
</div>
</body>
</hmtl>
You need to set a fixed width for your wrapper element (the div).
Then using margin: auto; will center everything that's inside your wrapper.
tribalost is offline  
Old 08/02/2009, 00:39   #5
 
elite*gold: 0
Join Date: Jan 2006
Posts: 98
Received Thanks: 5
100% works also too so its always fullscreen but u have to check ur site coz most sites are bad and look like **** if they use 100% value
SchnorrerKing is offline  
Old 08/02/2009, 12:52   #6
 
elite*gold: 0
Join Date: Dec 2006
Posts: 37
Received Thanks: 8
You can use my stylesheet:
Code:
#menu { float: left; width: 130px; }
#content { float: left; padding-left: 7px; width: 526px; margin-left: 4px; }
I think that's the code which centers MY site, you may have to edit it to fit your site.
It uses a menu to the left and the "content" of the site to the right, use it as:
Code:
<div id="menu">menu here...</div>
<div id="content">page content here</div>
And remember that it uses float so when you want to break it to float another item on your site, you must use:
Code:
clear:both;
Or as i use it:
Code:
.floatbreak { clear:both; }
Some simple CSS knowledge and for the next time, there's a lot of information about this on the web,
//Zeelia
Zeelia is offline  
Reply




All times are GMT +1. The time now is 21:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.