just want to center this

This is a discussion on "just want to center this" within the Web Page Design section. This forum, and the thread "just want to center this are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 26th, 2006, 08:47
New Member
Join Date: Dec 2006
Location: Philippines
Age: 20
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question just want to center this

I'm just a newbie in CSS.

In this site. http://icant.co.uk/articles/flexible-css-menu/index.html

I just want to center the navigation (Start/Images,The HTML,The CSS,etc.). How do I do it?? pls pls pls help.. tnx in advance!!!!
Reply With Quote

  #2 (permalink)  
Old Dec 26th, 2006, 11:53
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

Code: Select all
#boundary{

	text-align:left;

	font-size:.8em;

	border:1px solid #999;

	background:#fff;

	padding:20px;

	width:700px;

	margin:0 auto;
try

text-align: center;
Reply With Quote
  #3 (permalink)  
Old Dec 26th, 2006, 12:15
New Member
Join Date: Dec 2006
Location: Philippines
Age: 20
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

tnx so much for the help..

but the navigation bars still won't go to the center..

all the text goes to the center because of the ~text-align: center;~

i'm still working on this..
Reply With Quote
  #4 (permalink)  
Old Dec 26th, 2006, 13:40
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

Code: Select all
#nav{

	clear:both;

	font-weight:bold;

	color:#666;

	margin-left:4px;

	float:left;

	list-style-type:none;	

	background:url(navshadow.gif) no-repeat 8px 100% #fff;

	padding-bottom:21px;

}
try
text-align: center;


I'm kind of a newbie at CSS too.. but I'm trying! I'm sure once the regular CSS guru's get back from Christmas, they'll have the answer.
Reply With Quote
  #5 (permalink)  
Old Dec 26th, 2006, 13:59
New Member
Join Date: Dec 2006
Location: Philippines
Age: 20
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

tnx again...

i tried it. but nothing changed..

Reply With Quote
  #6 (permalink)  
Old Dec 27th, 2006, 12:15
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

If you want to centre the navigation, then you need to centre the containing element, in this case the <ul> containing the navigation list.

You could attempt this either by applying margin: 0, auto to the ul itself or by text-align: center on the ul's parent element. Whichever best suits your design.

Is this site you are producing meant to be for public consumption or is it just one you are using to educate yourself?

If it's meant to be for public enlightenment, then I think you need to develop your own skill set somewhat before producing such a site.
Reply With Quote
  #7 (permalink)  
Old Dec 27th, 2006, 12:25
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

Code: Select all
#nav{

	clear:both;

	font-weight:bold;

	color:#666;

	margin-left:4px;

	float:left;

	list-style-type:none;	

	background:url(navshadow.gif) no-repeat 8px 100% #fff;

	padding-bottom:21px;
Isn't the margin-left: 4 px; where your problem lies? Wouldn't you want that to be margin: 0 auto; ? or delete that and text-align: center; ?
Reply With Quote
  #8 (permalink)  
Old Dec 27th, 2006, 12:45
New Member
Join Date: Dec 2006
Location: Philippines
Age: 20
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

tnx so much for the help.. I'll try it now..

well I'm making a site, it is a project in school. No one can teach me how to use CSS there, so I'm just learning on my own.

tnx again!!!
Reply With Quote
  #9 (permalink)  
Old Dec 27th, 2006, 15:37
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,993
Blog Entries: 1
Thanks: 0
Thanked 32 Times in 32 Posts
Re: just want to center this

the UL won't center if he is using floats for the li's.

BTW you could do those tabs with 2 images and they don't needto be 3000px wide and you won't need js for IE.

1 corner on the li, the right corner/background on the li a. The tabs will expand/contract etc etc..

Read this if you want a good example: http://www.alistapart.com/articles/slidingdoors/
__________________
I hate IE 6. Just sayin....
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #10 (permalink)  
Old Dec 29th, 2006, 18:07
New Member
Join Date: Dec 2006
Location: Philippines
Age: 20
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: just want to center this

OoOh!! tnx to the link..

I'll read and study this one.
Reply With Quote
Reply

Tags
center

Thread Tools

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Div bg images..will not center? jahphill Web Page Design 5 Jun 2nd, 2008 09:03
how can i center this? djcritch Web Page Design 6 Feb 25th, 2008 07:06
center alexgeek Web Page Design 1 Aug 2nd, 2007 03:30
Why Cant i center Innes Web Page Design 7 Jun 20th, 2007 20:37
Center a Swf Help?? nutbolt Web Page Design 20 Apr 9th, 2007 10:21


All times are GMT. The time now is 23:35.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43