jQuery UI Widgets Forums Navigation Tabs Why can't I center content in tabs?

This topic contains 4 replies, has 2 voices, and was last updated by  sonicviz 8 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Why can't I center content in tabs? #75581

    sonicviz
    Participant

    Hi,
    How do you automatically center tab content?

    I have a div as the top level block holding dynamically generated content but the only thing that makes a difference is absolute positioning which doesn’t conform to web best practices re: responsive design

    eg: style=\”margin-left:auto;margin-right:auto;\” does nothing

    but style=\”margin-left: 20px;\” will shift left 20x.

    A simple css class also has no visible effect:
    .center {
    margin: 0 auto;
    }

    How is it possible to center tab content?

    ty

    Why can't I center content in tabs? #75583

    ivailo
    Participant

    Hi sonicviz,

    Unfortunately we don’t offer such a feature, but you can use this workaround.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Why can't I center content in tabs? #75589

    sonicviz
    Participant

    Hi,
    Thanks for the link, but that centers tabs not the content within the tabs.

    Are you seriously telling me you can’t center or locate content within tab panels?
    Surely there must be a way without having to manually calculate widths and black magic.

    That’s the whole point of css!

    Why can't I center content in tabs? #75590

    ivailo
    Participant

    Hi sonicviz,

    If you want the content to be centered you use <center> or text-align: center.
    Here is the demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Why can't I center content in tabs? #75597

    sonicviz
    Participant

    Hi,
    Thanks. It only works partially, however.
    Some elements under the div remain in place.

    I’ll have to look for another solution I guess.

    ty.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.