...

View Full Version : Need the css to be fix with center alignment



bluedeath
01-07-2010, 12:50 AM
HELLO FRENDS I HAVEPROBLEM REGARDING ALIGNING THE WHOLE webpage in the center i tried very ways but wasnt successful ....

here is code



<style type="text/css">
/*----------Text Styles----------*/
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.all {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;}
/*----------Para Styles----------*/
DIV,UL,OL /* Left */
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>



kindly let me fix this problem so that i can arrange whole page in the center ... i be so thankful 2 u all

Excavator
01-07-2010, 01:15 AM
Hello bluedeath,
That code you quote is only your CSS. We would need to see your HTML as well.
Or maybe not. Your website may be wrapped in one main containing div that you can center.
To center an element you will need 3 things:

a DocType declaration
an element with a width
that elements left/right margins set to auto


If that is not enough information we will need to see your site. A link to the test site is always best.

CoffeeCup.com
01-07-2010, 02:45 AM
Hello,

Please visit the following sites to get some incite on CSS:

http://www.wpdfd.com/issues/70/css_from_the_ground_up/
http://www.csszengarden.com/
http://www.alistapart.com/topics/design
http://www.w3schools.com/css/default.asp

Hope this helps!!!! :thumbsup:
CoffeeCup.com

bluedeath
01-07-2010, 03:15 AM
this is the website i was talking about its not gud one but i just want to know how can we do that ... how can i put whole text in the center no matter what resulution the laptop screen is www.completepccares.com plz guide me and also paste the edited code here so that i come to know where i was lacking

Excavator
01-07-2010, 08:53 AM
Add this bit in red to your CSS -
/*----------Text Styles----------*/
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;}
/*----------Para Styles----------*/
DIV,UL,OL /* Left */
{
margin-top: 0px;
margin-bottom: 0px;
}
body {
width: 968px;
margin: 0 auto;
position: relative;
}


That will acomplish what I explained in my earlier post.
It does seem like all those absolute positioned divs have some left:xx; that needs to be zero'd for that to work.

bluedeath
01-07-2010, 06:21 PM
First of all Thank You Sir for helping me alot in coding .... accept my heartiest Thanks please ....


sir i did same way u told and put left:0px; as u have said but now whats happening all graphics pictures and eveything they accumulating on the extreme left side of the web page .... please help me out sir ......



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum