Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,423 members, 7,958,270 topics. Date: Wednesday, 25 September 2024 at 11:35 AM |
Nairaland Forum / Science/Technology / Programming / How Can I Center The Main-container In This HTML Layout ? (1163 Views)
Notice the nairaland layout changes / Next Level Layout GUI / Pls Help A Beginner In This HTML (2) (3) (4)
How Can I Center The Main-container In This HTML Layout ? by furaoing: 5:15pm On Jun 27, 2017 |
For the desktop browser version of this site, I did set a maximum-width limit on the div that is the main-container (class="main-container" of the webpage. However, I did not know how to center this element to the center of the screen. Currently it is positioned at the left side of the screen. Any ideas ? webpage address (Desktop webpage, not mobile !): http://www.nigeria123.net/
|
Re: How Can I Center The Main-container In This HTML Layout ? by Nobody: 5:28pm On Jun 27, 2017 |
Set the div's right and left margins to auto. |
Re: How Can I Center The Main-container In This HTML Layout ? by Kingpinukecy(m): 5:32pm On Jun 27, 2017 |
furaoing: Try dis and see i don't knw if u r using CSS TO style d HTML webpage. if yes, apply dis formating to it. body{ margin:0px; padding:0px; } .main-container{ width:980px; margin: 0px auto; } Dat is all d margin aspect will help to centralize d page ..Auto means setting left n right to center by d browser. U can contact me anytime u like for any help including java programming. # zero seven zero,three zero six,five two two, zero three |
Re: How Can I Center The Main-container In This HTML Layout ? by Nobody: 7:37pm On Jun 27, 2017 |
create a div and set thhe class to container in html, then set the margin to auto in css div class="container" then let overflow be hidden .container{ margin:auto; overflow:hidden;} |
(1) (Reply)
Laravel Developers In Benin City / Help I Want To Be A Web Developer Who Can Teach Me, Help A Brother Seniors / Urgent: A Python Programmer Is Needed In Abuja
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11 |