Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need the css to be fix with center alignment

    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

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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:
    1. a DocType declaration
    2. an element with a width
    3. 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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post

  • #4
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hello Sir Thanks for replying to me

    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

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Add this bit in red to your CSS -
    Code:
    /*----------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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ......
    Last edited by bluedeath; 01-07-2010 at 05:23 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •