Centering your entire site
FILES: css/base.css
Step 1
Open up your base.css file.
Step 2
You are then presented with this. Of course theres more, but this is all we will be working with! Next, just simply add the style rule “text-align:center;” to your file, anywhere between the brackets in your body style as shown below. This just tells the server to center all the text in the body of the website. Of course it’s not text we are trying to center, its the container, but it recognizes it as a text element, and thus centers it.
body {
margin: 0;
background-color: #1d1f2c;
font: 9pt/1.5em Arial, Tahoma, Verdana, "Lucida Grande", sans-serif;
color: #333;
text-align:center;
}
Step 3
Now take a look at this, which is what you will be working with next. Now, you will need to adjust your width of the container. You can use whatever you’d like, but please note that if you choose to do something rather smaller, you will have to edit some element sizes of the website not explained in this tutorial. We will be working with 1000px.
Step 4
Last step, is to add the rule “text-align:left;” to the container style. This tells the container to align everything to the left, as opposed to the center which is what the body style tells it to do. In other words, it makes the container look the same as it was before when it was a full page.
#container {
margin: 0 auto;
width:1000px;
text-align:left;
}
And thats pretty much it!
- bohimt's blog
- Login or register to post comments
Drigg code is a
Drigg code is a revolutionary code that enables us to explore further features.video clips
Thanks
Drigg code is a revolutionary code that enables us to explore further features.
Thanks for the very good presentation.
You have illustrated all the information in a very organized & straight to the point steps, which made it very easy to implement.
Houston Locksmith
laptop accessories
Acer Extensa 4620Z AC Adapter(Output: 19V 3.42A;Power: 65W)Acer Extensa 5610 AC Adapter(Output: 19V 3.42A;Power: 65W)Compaq Business NC4200 AC Adapter(Output: 18.5V 3.5APower: 65W)
hi
Acer AP.18001.001 AC Adapter(Input: AC100-240V (worldwide use);Output: DC19V 9.5A )Dell Inspiron 600M AC Adapter(Input: AC100-240V (worldwide use);Output: DC19.5V 3.34A )Dell Latitude D510 AC Adapter(Input: AC100-240V (worldwide use);Output: DC19.5V 3.34A )
laptop accessories
Dell Inspiron 8200 AC Adapter(Input: AC100-240V (worldwide use) Output: DC20V 4.5A 90W Outlet: 3-prong )Gateway MT3705 AC Adapter(Input: AC100-240V (worldwide use) Output: DC19V 4.74A 90W Outlet: 2-prong )GATEWAY ADP-90SB AC Adapter(Input: AC100-240V (worldwide use) Output: DC19V 4.74A 90W Outlet: 2-prong )
Hi, It looks pretty good.
Hi, It looks pretty good. Now this site displaying uniformity. Text alignment is excellent idea. Thanks!
Henderson Attorneys
Thanks for your useful info,
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with uslyrics
thanks for this. for more
thanks for this.
for more soccer shoes and pannini grills, visit
Boys Indoor Soccer Shoes,
Women's Indoor Soccer Shoes and
Pannini Grill
Thanks for your useful info,
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with usemail lists
Good job
Good job, you have illustrated all these information in a very organized, easy & step by step way, which makes it easy for every one to implement it.
Thanks for the information, I will be using it on my next project.
renaissance clothing for sale
This does work well. I have
This does work well. I have used the code and it works for me. Thanks for the great info.
hartford mesothelioma lawyers
Thanks for your useful info,
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with us.Army Surplus
I've gotten some feedback
I've gotten some feedback from people wondering why their site isn't being centered in firefox!
Although, its in the tutorial, some people are leaving off the "auto" attribute in the margin rule.
Seguro Automoviles
Centering your entire site !!!!!!!!!
Drupal offers a sophisticated programming interface for developers, no programming skills are required for basic website installation and administration.The tutorial is user friendly as we are able to understood how to center our site...THe steps clearly explains this...Thanks for sharing this information....
Horse Girl
I’m impressed, you know
I’m impressed, you know what you’re talking about
buy laptop
Thanks for your useful info,
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with us.
windows vista drivers
Hi
Great info thanks for share
Vimax | Vigrx | Penis Enlargement Pills
Where the digg clone
Where the digg clone software finds much application?
eteleon
another great tutorial.
another great tutorial. thanks for sharing
for more soccer shoes, visit
Womens Indoor Soccer Shoes,
Boys Indoor Soccer Shoes and
Women's Indoor Soccer Shoes
affordable seo services
affordable seo services affordable seo services
free ways to make money online free ways to make money online
cheap laptop batteries cheap laptop batteries
thank you for the step by
thank you for the step by step instruction, it really helped me a lot. . .
thank you for the step by
thank you for the step by step instruction, it really helped me a lot. . .
Majorca holidays
Beautiful Nike Air Max 90
Nike Air Max 90 Nike Air Max 90
It is so nice.Thank you for sharing.Good post.
Thanks for your useful info,
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with us.
oscommerce templates
What is Digg clone
What is Digg clone software,give more details?
web hosting reseller
zouma The nike dunks Low
zouma The nike dunks Low Premium SB ?Trickster BMX is one of the products in the Louis Vuitton Bags the FC Saint Paul Nike Dunk, the Premi
nice
Interesting post and I really like your take on the issue. I now have a clear idea on what this matter is all about. Very nice informative.
provillus hair loss
Oh, I never thought that we
Oh, I never thought that we can do that with Drupal site. That's why I've been using left oriented margin. This is a great tut. I will make my web centre now. Thanks.
dog obedience training
I've gotten some feedback
I've gotten some feedback from people wondering why their site isn't being centered in firefox!
Although, its in the tutorial, some people are leaving off the "auto" attribute in the margin rule.
tower defense games
good info
Post very nicely written, and it contains useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.
Payday Loan
cheap uggs online
Good sharing!
I don’t know whether you ugg cheapcan read this message, but I think I should tell you something about my attitude for you! I am so grateful for ugg bootsyour sharing.
Bestellen kaufen ohne rezept
Apotheke online bestellen:
Kamagra bestellen
Viagra
Kamagra kaufen
Steps posted works.thanks To
Steps posted works.thanks
To know more about frontline plus, visit my sites at
frontline plus best price
frontline plus side effects
best price frontline plus
What is Digg clone
What is Digg clone software,give more details? plz. cheers!!!
Music Lyrics
Interesting post and I
Interesting post and I really like your take on the issue. I now have a clear idea on what this matter is all about. Thank you so much.
drug rehab in southern california
I've gotten some feedback
I've gotten some feedback from people wondering why their site isn't being centered in firefox!!!!
Business Email List
Thanks for sharing
Thanks for sharing this.
master degree Occupational safety
nice
Thanks for your useful info, I think it’s a good topic.Thanks for sharing with us.
e-cigarettes
ujm
How we can do centering of our entire site?give more details.
flooring
Thanks for the codes. I was
Thanks for the codes. I was looking for this for a week now.
For more information about bath and body works, come and visit my site:
bath and body works coupons
ugg boots sale
You will like the ugg boots,you will found the shoes make you become more and more beautiful.More and more people choose cheap ugg boots. and ugg london. So you know that ugg series of the most famous is the jordan shoes ugg boots sale. ugg boots london. I recommend you go to online store, there have a lot of ugg bootsUgg Sundance II 5325
Ugg Classic Tall 5815 Ugg New Arrival 5803 Ugg Classic Mini 5854 Ugg Nightfall 5359
thank you for the step by
thank you for the step by step instruction, it really helped me a lot. . .
greece holidays
It is quite common that
It is quite common that women usually have the desire to buy new jewelries which are seemed to be better than the old ones. links of london sweetie bracelets Therefore, light jewels having no strain are more suitable for them than the lager gold ones. links of london charm Since once the jewels and dresses are well matched, the personal taste and qualities will be revealed. links of london Jewelry However, to match jewelry is a complex art that many people have no idea about how to properly wear and properly maintain links of london charm. links of london chain Here are some tips for you to choose and match jewelries. Hope to have some assistance. links of london bracelet
Oh, I never thought that we
Oh, I never thought that we can do that with Drupal site. That's why I've been using left oriented margin. This is a great tut. I will make my web centre now. Thanks.
restaurantes romanticos en madrid
Tiara Thompson
ghd Hair Straighteners
We guarantee we provide the cheapest ghd, ghd Hair Straighteners,ghd straighteners, ghd hair tools in the market and 100% Quality Guarantee.
i cant stop myself thanking
i cant stop myself thanking again and again thank you again friend. . .
cheap hotel deals
Ugg Boots & Ugg Boots UK Online Store-Latest Ugg Boots Sale avai
I recommend you go to online store, there have a lot of ugg boots sale,If you want to buy a pair of cheap ugg boots uk.More and more people chooseugg boots uk. So you know that ugg series of the most famous is the ugg boots.air jordan shoes,air jordans
i had tried all the ways
i had tried all the ways before but i couldnt thanks drigg for helping me. . .
home information packs berkshire
i think a whole screen
i think a whole screen layout is much more cool than a centered one . .
egypt holidays
دردشه|العاب|منت
دردشه|العاب|منتديات|forum|العاب بنات|العاب طبخ|العاب تلبيس|العاب سيارات|games|منتدى بنات|banat forum|بنات ستايل|مسجات|ازياء|نكت|مركز تحميل|business directory|health|computers|business|شات حلا الرياض|chat|شات سعودي|دردشة كتابية|شات عربي|
دردشة صوتية|العاب اكشن|شات كويتي|نغمات نوكيا|دردشة سورية|العاب اطفال|العاب باربي|مكياج|تسريحات|فساتين سهره|العاب حرب|العاب قتال|خريطة 1|forex|games|land|العناية بالبشرة|society|عوانس|ياسر القحطاني|ناصر الفراعنة|مجلة روتانا|مجلة زهرة الخليج|قصة حياتي|شات بنات