http://kenleafay.atspace.com/index.html
example for anyone still having issues. On Apr 15, 9:25 am, "Richard D. Worth" <rdwo...@gmail.com> wrote: > It can be done. Adapted fromhttp://24ways.org/2005/centered-tabs-with-css: > > .ui-tabs .ui-tabs-nav { float: none; text-align: center; } > .ui-tabs .ui-tabs-nav li { float: none; display: inline; } > .ui-tabs .ui-tabs-nav li a { float: none; } > > /*\*//*/ > .ui-tabs .ui-tabs-nav li a { display: inline-block; white-space: nowrap; > width: 1px; } > .ui-tabs .ui-tabs-nav { padding-bottom: 0; margin-bottom: -1px; } > /**/ > > /*\*/ > * html .ui-tabs .ui-tabs-nav li a { padding: 0; } > /**/ > // --> > > - Richard > > On Tue, Apr 14, 2009 at 10:16 PM, James <james.gp....@gmail.com> wrote: > > > I'd be interested if anyone did find a possible way. > > > As far as I know, this is a limitation of CSS especially having > > content with dynamic widths and it can't be done. > > This is one of the places where people says tables have some > > advantages over div's. :p > > > On Apr 14, 4:45 am, AndyCramb <andycr...@googlemail.com> wrote: > > > Thanks Todd > > > > Aah I think we have a misunderstanding :-) > > > I am trying to center the tabs not the text within the tabs > > > > Andy > > > > On Apr 14, 2:56 pm, Todd Parker <fg.t...@gmail.com> wrote: > > > > > I'm not sure what's up without seeing your code, but I just re-tested > > > > this to make sure it was working and it worked for me on FF3/Mac. I > > > > used Firebug to set these styles and they worked on the tabs demo page > > > > on the UI site. > > > > > Just to check, I copied this style override: > > > > > .ui-tabs .ui-tabs-nav li a { > > > > text-align:center; > > > > width:155px; > > > > > } > > > > > ...and pasted it into a style block in the head of this page and the > > > > text alignment was centered. I set the width to 155 just so it was > > > > wider than needed to see the effect: > >http://jqueryui.com/demos/tabs/default.html > > > > > Can you re-try? Maybe without a larger width explicitly set, you > > > > couldn't see the centered text effect? > > > > > -Todd > > > > > On Apr 14, 5:53 am, AndyCramb <andycr...@googlemail.com> wrote: > > > > > > Hi Todd, > > > > > > Thanks for the help but like Spencer I could not get this to work > > > > > There was no difference after adding these styles > > > > > > Do you have an example of center aligned tabs that I could compare my > > > > > code against > > > > > > Thanks > > > > > Andy > > > > > > On Apr 10, 9:59 pm, Todd Parker <fg.t...@gmail.com> wrote: > > > > > > > Hi Andy - > > > > > > > In a new override CSS file that you include *after* the jQuery UI > > > > > > theme files in your head, add these styles: > > > > > > > .ui-state-default a, > > > > > > .ui-state-default a:link, > > > > > > .ui-state-default a:visited { > > > > > > text-align:center; > > > > > > > } > > > > > > > This is the level of specificity you need to override the default > > left > > > > > > alignment. You could also specify a width here too. > > > > > > > Cheers, > > > > > > Todd > > > > > > > On Apr 10, 11:48 am, AndyCramb <andycr...@googlemail.com> wrote: > > > > > > > > I have tried centre aligning the tabs using > > > > > > > > #wrapper #tabs ul{ > > > > > > > text-align: center; > > > > > > > > } > > > > > > > > This did not work > > > > > > > Has anyone managed to do this > > > > > > > Any help is much appreciated --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@googlegroups.com To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---