HighDots Forums  

Center using CSS?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Center using CSS? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Web Office Juan
 
Posts: n/a

Default Center using CSS? - 07-16-2004 , 06:37 PM






How can I center the two selectors (#banner, #content) of my web page using only css?

Reply With Quote
  #2  
Old   
jojo
 
Posts: n/a

Default Re: Center using CSS? - 07-16-2004 , 08:05 PM






Web Office Juan wrote:

Quote:
How can I center the two selectors (#banner, #content) of my web page using only css?
Hi

body{
text-align: center; <-- forces IE 5.x pc to center the wrapper
}

#wrapper{
position: relative;
text-align: left; <-- realigns the text after above hack
margin: 0 auto; <-- centers the div on the page
}

then position your #banner and #content within the wrapper.

--
Cheers jojo
Team Macromedia Member Volunteer for Dreamweaver MX
http://www.webade.co.uk
----------------------------------------------------
Extending Knowledge, Daily.
http://www.communityMX.com/
Free 10 day trial
http://www.communitymx.com/joincmx.cfm
----------------------------------------------------


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.