How do you manage the complete site in center of the browser, which is completely using divs using the help of css2 or css3?

Questions by sunil.akula

  
Showing Answers 1 - 54 of 54 Answers

srikanth rao

  • Jun 28th, 2007
 

Yes we can do it with insert a div with a class. In styles file class name give the margins with the width % for the layout

  Was this answer useful?  Yes

Balbir Singh

  • Aug 18th, 2007
 

In CSS file
1. body{width:100%;}
2. Create a div tag and assign a class, say 'container' and place all your content in this div tag.
3. Assign properties to this class in CSS file
container{width:777px; margin:auto;}
Note: "margin:auto" will place your page in center of the page.

Rohit Salviya

  • Jun 2nd, 2013
 

Margin: 0 auto;

  Was this answer useful?  Yes

Soniya Singh

  • Aug 10th, 2013
 

Code
  1. body

  2. {

  3. padding :0 px;

  4. margin:0 px;

  5. }

  6. #main

  7. {

  8. width:80%;

  9. margin:auto;

  10. }

  11. <div id="main"></div>

  Was this answer useful?  Yes

srb

  • Oct 20th, 2013
 

Try this

Code
  1.  

  2. "div align="center"><!--wrapper-->

  3. ...

  4. <div>"

  Was this answer useful?  Yes

zakir

  • Jul 12th, 2014
 

margin:0 auto;

  Was this answer useful?  Yes

justinDhiraviam

  • Sep 20th, 2014
 

Code
  1. Margin:0 auto#wrapper {

  2. margin: 0 auto

  3. }

  Was this answer useful?  Yes

Harpreet

  • Nov 23rd, 2014
 

Code
  1.  

  Was this answer useful?  Yes

pradeep sagar

  • Dec 28th, 2014
 

Code
  1.  

  Was this answer useful?  Yes

Pradeepa

  • Feb 7th, 2015
 

CSS3

  Was this answer useful?  Yes

jitu

  • Apr 6th, 2015
 

#wrapper{margin:0 auto; max-width:1178px;}

  Was this answer useful?  Yes

adinarayana

  • Apr 8th, 2015
 

width:900%; margin:0 auto;

  Was this answer useful?  Yes

MohanM

  • Apr 9th, 2015
 

#wrapper{margin:0 auto;}

  Was this answer useful?  Yes

sumit

  • May 20th, 2015
 


//fULL Code Of Your Site But Content Are Moved So Adjust Th content

  Was this answer useful?  Yes

pankaj

  • Sep 12th, 2015
 

.container{ margin:0 auto;}

  Was this answer useful?  Yes

Harsha

  • Nov 26th, 2015
 

body{
margin:0 auto;}

  Was this answer useful?  Yes

mounika

  • Jun 28th, 2017
 

margin-left:auto;
margin-right:auto;

  Was this answer useful?  Yes

Abdul

  • Aug 28th, 2017
 

body{
margin:0 auto;
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions