Support Forums

How to Center Tabs at top of page?

This is a discussion on How to Center Tabs at top of page? within the Technical Support forums, part of the Technical Support Forums category; Hi, I removed some of the tabs at the top of my page and wanted to know how to center ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-09-2008, 02:51 PM   #1
Customer
 
Join Date: Aug 2008
Posts: 80
Rep Power: 14
nagrap2 is on a distinguished road
Default How to Center Tabs at top of page?

Hi,

I removed some of the tabs at the top of my page and wanted to know how to center them?

Online Tutoring, Personal Tutoring Website TutorHeaven.com

Please can someone help.

Thanks in advance...
nagrap2 is offline  
Old 09-09-2008, 02:59 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

you will need to edit the css and adjust the margin

ul {
margin: 0;
padding : 0;
list-style : none;
}

from the above to something like....

ul {
margin: 0px 0px 0px 50px;
padding : 0;
list-style : none;
}
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-09-2008, 03:23 PM   #3
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by Lhotch
you will need to edit the css and adjust the margin

ul {
margin: 0;
padding : 0;
list-style : none;
}

from the above to something like....

ul {
margin: 0px 0px 0px 50px;
padding : 0;
list-style : none;
}
I would actually change it to auto which is the equivalent of center in CSS, like this:
margin: 0px auto;
That should theoretically give a 0 margin at the top and the bottom and an equal margin for the left and right, therefore centering it. I haven't tested this though.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 09-09-2008, 03:36 PM   #4
Customer
 
Join Date: Aug 2008
Posts: 80
Rep Power: 14
nagrap2 is on a distinguished road
Default

Hi,

That doesnt seem to work, I made the following changes - see red text, can you check and let me know if this is correct:

/* horizontal tabbed menu */
#tabs { background: #fff url(../images/bigbox.gif) no-repeat top left; color: #000; height: 64px; text-align: center; padding: 0 0 0 210px; }
#tabs li { display: inline; height: 45px; }
#tabs li a { float: left; background: #fff url(../images/barbg.gif) no-repeat; color: #808080; padding: 7px 0; width: 82px; text-align: center; font-weight: bold; text-decoration: none; }
#tabs li a:hover { background: #fff url(../images/barcurrent.gif) no-repeat; color: #000; }
#tabs li a.current { background: #fff url(../images/barcurrent.gif) no-repeat; color: #2C71AE; }
.key { text-decoration: underline; }


/* lists and form elements */
/* ul { margin: 0; padding : 0; list-style : none; } */
ul { margin: 0px auto; padding : 0; list-style : none; }
form { margin: 0; }
input.search { width: 279px; border: none; background: #fff url(../images/input.gif) no-repeat; padding: 6px 10px; color: #1E67A8; font-weight: bold; }
input.button { padding: 3px; }
nagrap2 is offline  
Old 09-09-2008, 04:11 PM   #5
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Did that have any affect? Did you refresh your browser and/or clear the cache? How about a link?

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 09-09-2008, 04:16 PM   #6
Customer
 
Join Date: Aug 2008
Posts: 80
Rep Power: 14
nagrap2 is on a distinguished road
Default

Mike,

It didnt seem to work: Online Tutoring, Personal Tutoring Website TutorHeaven.com
nagrap2 is offline  
Old 09-09-2008, 05:21 PM   #7
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

OK, so now I'm actually looking at the page code and the CSS and I see why that didn't work.

Unfortunately, it seems the only way to make it work (without restructuring the whole tabs id display) is what Larry was indicating which would be to hard code it. Either use Larry's suggested: margin: 0 0 0 50px;
OR use a padding: 0 0 0 86px;

This means that you will need to adjust that if you modify the number of tabs down the road.

Sorry to have delayed your solution from Larry's response.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 09-10-2008, 01:42 PM   #8
Customer
 
Join Date: Aug 2008
Posts: 80
Rep Power: 14
nagrap2 is on a distinguished road
Default

Awesome, the padding option worked: 0 0 0 86px;

Thanks for your help guys !!!!
nagrap2 is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Center navigation tabs Fede79 Templates, HTML, CSS, and Design Help 8 08-25-2008 10:38 PM


All times are GMT -4. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0