Results 1 to 4 of 4

Setting the context in the center for any resolutions ...

This is a discussion on Setting the context in the center for any resolutions ... within the Programming forums, part of the Web Designing & Development category; I have something like the following. This is where the main content goes. Code: #screen { margin: 0px; padding: 0px; ...

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    72

    Default Setting the context in the center for any resolutions ...

    I have something like the following. This is where the main content goes.

    Code:
    	#screen {
                margin: 0px;
                padding: 0px;
                height: 675px;
                width: 900px;
            }
    	#picture {
                position: absolute;
                margin-left: 0px;
                margin-top: 0px;
                width: 450px;
                height: 675px;
                background: #000;
    	}
    	#text {
                position: absolute;
                left: 450px;
                margin-top: 0px;
                width: 450px;
                height: 675px;
                background: #000;
                filter: alpha(opacity=70);
                opacity: 0.7;
    	}
    Now I want to place this in the center of the screen using CSS. I'm pretty sure that this is rather elementary for CSS experts, but ... I can't quite figure out. How can I do this ...???
    online.education

  2. #2
    Super Moderator wired076's Avatar
    Join Date
    May 2007
    Posts
    685

    Default Re: Setting the context in the center for any resolutions ...

    Depending on what it is you could use the text-align: attribute and set it to center (spelt the American way) which can work otherwise I believe there is another way and would also like to find out what it is.
    I.T. Construct
    Web Hosting and Webmaster support/work is available.
    Email: admin@itconstruct.com.au

    Visit http://www.itconstruct.com.au
    Super Moderator of Webicy Forum.

  3. #3
    Senior Member slnet's Avatar
    Join Date
    May 2007
    Location
    Swapna Lokam
    Posts
    413

    Default Re: Setting the context in the center for any resolutions ...

    Code:
    body {
    	margin:50px 0px; padding:0px;
    	text-align:center;
    	}

    add this to your style sheet and everything in the page will hopefully be centered... just explaining what wired said above.. make sure you make changes according to your needs.. as far as.. margins and padding..
    Where from, Why here, Where to..?
    May god bless, who he wishes to bless!!

    ----------------------
    Affordable and reliable hosting at www.marginfreehosting.com

  4. #4
    Senior Member
    Join Date
    Mar 2011
    Posts
    194

    Default Re: Setting the context in the center for any resolutions ...

    Thanks a lot mentioning the coding part,it is very useful................