New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

Center site in all browsers


Post Reply New Thread Subscribe

 
Thread Tools
DaZ

 
DaZ's Avatar
 
Member Since: Jul 06, 2008
Location: California
Posts: 43
DaZ is on a distinguished road
Mac Specs: 24" iMac 2.8GHz, Intel Core 2 Duo, 2GB RAM, iphone 3G, & Classic ipod

DaZ is offline
Hello All,

I am creating a website (CSS) with dreamweaver and I am having problems with centering my site in all browsers. I've heard that this could be done with code. Can someone please explain what I would type and where I should type it in at.

Thanks,
-Daz

-Daz
QUOTE Thanks
Unibody

 
Unibody's Avatar
 
Member Since: May 31, 2009
Location: Vancouver, Canada
Posts: 203
Unibody will become famous soon enough
Mac Specs: 15" Unibody (Jan 09)

Unibody is offline
Wrap the entire site in a div, and ID it "wrapper". Then put this in the CSS:

#wrapper {
width: 800px;
margin-left: auto;
margin-right: auto;
}

That should do it, replace 800px with your desired width.
QUOTE Thanks
DaZ

 
DaZ's Avatar
 
Member Since: Jul 06, 2008
Location: California
Posts: 43
DaZ is on a distinguished road
Mac Specs: 24" iMac 2.8GHz, Intel Core 2 Duo, 2GB RAM, iphone 3G, & Classic ipod

DaZ is offline
Thanks for the fast reply. I changed the div id="wrapper" but I am not sure where to enter:
#wrapper {
width: 800px;
margin-left: auto;
margin-right: auto;
}
Thanks again

-Daz
QUOTE Thanks
louishen

 
louishen's Avatar
 
Member Since: Oct 22, 2007
Location: London
Posts: 8,951
louishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant futurelouishen has a brilliant future
Mac Specs: Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver

louishen is offline
the code
Quote:
#wrapper {
width: 800px;
margin-left: auto;
margin-right: auto;
}
Should go in the CSS file that all your pages should be linking to

Its just a text file so you can copy the above code in to a plain text file (textEdit) and save it as filename.css (or whatever filename you like, but make sure it is a plain text file and has the .css extension).

Place it in a folder called CSS in your site and then link your page(s) to that file from Dreamweavers CSS palette

Member of the Month September 2008 & August 2012 | Found advice useful? use the rep system
QUOTE Thanks

Post Reply New Thread Subscribe


« Header Text / iWeb | iWeb Question »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Website doesn't render right in Mozilla-based browsers Clairejr Web Design and Hosting 5 02-18-2009 05:30 PM
Why is iWeb site not looking right greyS60 Web Design and Hosting 9 10-12-2006 01:56 PM
Request new web site visitor color check SSSdave Schweb's Lounge 9 08-26-2005 02:01 AM
HELP I'm trying to clean out old web site files from server bluerose Web Design and Hosting 8 02-16-2005 10:42 PM

All times are GMT -4. The time now is 06:45 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?