NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page center site with div container?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 11-12-2010, 04:12 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Mar 2005
Posts: 192
oberheimer is a jewel in the roughoberheimer is a jewel in the roughoberheimer is a jewel in the rough
 



center site with div container?


I'm designing a site with div's but there is somehting wrong.

How can i center the whole site as it is now it's aligned left

I will chnage colours and everything later and ad content, it's just so i can keep track of all the divs

if you look here http://www.ripwear.com/index.html
and http://www.ripwear.com/style.css

Can anyone help me out
__________________
clap.com clap - your music forum

---------------------------------------
BUYING LLL.com & Quality word.com
oberheimer is offline   Reply With Quote
Old 11-12-2010, 07:11 AM   #2 (permalink)
Senior Member
Join Date: Sep 2006
Location: London, UK
Posts: 1,900
Erdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond reputeErdy has a reputation beyond repute
 



You forgot px. Change this:
Quote:
#container {
width: 1220;
}

To this:
#container {
width: 1220px;
}

Btw, I like your domain. It's very nice.
Last edited by Erdy; 11-12-2010 at 07:17 AM.
Erdy is offline   Reply With Quote
Old 11-12-2010, 08:09 AM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Mar 2005
Posts: 192
oberheimer is a jewel in the roughoberheimer is a jewel in the roughoberheimer is a jewel in the rough
 



Originally Posted by Erdinc View Post
You forgot px. Change this:



To this:
#container {
width: 1220px;
}

Btw, I like your domain. It's very nice.

????: NamePros.com http://www.namepros.com/programming/686883-center-site-with-div-container.html
lol was it that simple...
But thanks alot for the help
__________________
clap.com clap - your music forum

---------------------------------------
BUYING LLL.com & Quality word.com
oberheimer is offline   Reply With Quote
Old 01-03-2011, 12:29 AM   #4 (permalink)
New Member
Join Date: Jan 2011
Posts: 3
cools4u is an unknown quantity at this point
 



You can also use <div> tag to center whole webpage in a website...as to add a constant value can cause problem on different resolutions...
__________________
Car Rental Blog | WebExcel Forums
cools4u is offline   Reply With Quote
Old 01-03-2011, 07:50 AM   #5 (permalink)
NamePros Regular
 
lihen's Avatar
Join Date: Feb 2008
Location: India
Posts: 953
lihen has much to be proud oflihen has much to be proud oflihen has much to be proud oflihen has much to be proud oflihen has much to be proud oflihen has much to be proud oflihen has much to be proud oflihen has much to be proud of
 



I will suggest you do stick to CSS instead of div tag to center the content of the site until you can not avoid it. Better performance
__________________
Want to Earn more profit on domain sales - Develop Them
WHY DEVELOP -> Domain gets PR # Domain starts aging # Links increase
Professional Website Development for Just $17
lihen is offline   Reply With Quote
Old 01-18-2011, 04:51 PM   #6 (permalink)
>< ))) ‘>
 
fish's Avatar
Join Date: Jun 2005
Location: US
Posts: 1,094
fish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond reputefish has a reputation beyond repute
 

Member of the Month
August 2007
Ethan Allen Fund
CSS is used to style HTML tags (including div).

For future reference, the best way to do this is to set a fixed width to the div and then set the left and right margins to auto.

Code:
#wrapper { width: 1000px; margin-left: auto; margin-right: auto; }
Code:
<div id="wrapper">This div is centered</div>
(And yes, I know about CSS shorthand...just formatted it like that so it would be easier to understand for beginners.)
fish is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Examples of Developed L-L-L.com's Pred "Short" Domain Discussion 255 06-21-2008 01:44 AM
290+ Domains For Sale u7q.com, socialtycoon.com, rxhq.com, excellentbeer.com and more mykel241 Domains For Sale - Fixed Price 0 02-12-2007 05:51 PM

 
All times are GMT -7. The time now is 02:39 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger