views:

25

answers:

1

Hi all,

I'm (needless to say) relatively new to CSS3 and I'm having trouble with aligning content.

I have a page with a jQuery UI Tabs module in it. When I display it on the page, it comes out looking like this:

alt text

EDIT I know it's a terrible screenshot, but I'll just say, the Tab box is left-aligned on the page.

I've tried to use the text-align property on the <td> and the <div> containing the content, I even got so desperate I tried the HTML <center> tag, all to no avail.

Does anyone have a sure-fire way of centering content with CSS?

Thanks in advance! :)

+1  A: 

Not sure what you're HTML looks like, but you could try something like:

<div style="width: 50%; margin-left: auto; margin-right: auto">
    ... tabs
</div>
JungleFreak
`margin-left` and `margin-right` did the trick. Thanks so much!
esqew
Woot! My first answer and it was accepted. Glad I could help!
JungleFreak