The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Centering Tables

4 posters

Go down

Solved Centering Tables

Post by DRO N1nja June 7th 2010, 10:53 pm

How do i center a table i am trying to post? I just cant get the [center"][/center"] to work. (the " is so u can see it)
avatar
DRO N1nja
Forumember

Male Posts : 57
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by KingOfSports June 7th 2010, 11:13 pm

Try 1 of these codes:

Code:
<div align="center">

Code:
<table align="center">
KingOfSports
KingOfSports
Hyperactive

Male Posts : 2487
Reputation : 38
Language :
Location :

Back to top Go down

Solved Re: Centering Tables

Post by DRO N1nja June 7th 2010, 11:34 pm

didnt wrk
avatar
DRO N1nja
Forumember

Male Posts : 57
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by KingOfSports June 7th 2010, 11:55 pm

Are you trying to center the table or the text or both?
KingOfSports
KingOfSports
Hyperactive

Male Posts : 2487
Reputation : 38
Language :
Location :

Back to top Go down

Solved Re: Centering Tables

Post by DRO N1nja June 7th 2010, 11:57 pm

i already centered the text i just need the table itsself
avatar
DRO N1nja
Forumember

Male Posts : 57
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by KingOfSports June 7th 2010, 11:58 pm

Did you make it with HTML or BBcode?
KingOfSports
KingOfSports
Hyperactive

Male Posts : 2487
Reputation : 38
Language :
Location :

Back to top Go down

Solved Re: Centering Tables

Post by DRO N1nja June 8th 2010, 12:01 am

the entire thing is BB
avatar
DRO N1nja
Forumember

Male Posts : 57
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by KingOfSports June 8th 2010, 12:05 am

Code:
<P ALIGN="CENTER">Text</P>
KingOfSports
KingOfSports
Hyperactive

Male Posts : 2487
Reputation : 38
Language :
Location :

Back to top Go down

Solved Re: Centering Tables

Post by RoNo June 8th 2010, 4:25 am

Try adding: style="margin-left:auto; margin-right:auto"

Example
Code:
[table style="margin-left:auto; margin-right:auto; border:black 2px dotted; background:white; padding:3px"][tr][td]Content[/td][/tr][/table]

Content

_________________
Centering Tables Yf3xzjc
- General rules
- Tricks & Tips
- FAQ listing
- For founders who lost their passwords
- About support requests by PM
- Announcements & Updates


Last edited by RoNo on June 11th 2010, 6:53 pm; edited 1 time in total
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Solved Re: Centering Tables

Post by harvengure June 8th 2010, 4:50 am

Try this. XXX would be the table. Though adding the margin as above works too.
Code:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://www.alexandremagno.net/jquery/plugins/center/jquery.center.js" type="text/javascript"></script>
        <script type="text/javascript">
        jQuery(document).ready(function() {
              jQuery("XXX").center({vertical: false});
           });
    </script>
avatar
harvengure
Forumember

Posts : 86
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by DRO N1nja June 8th 2010, 10:12 pm

Thanks RoNo, it worked. Centering Tables Icon_smile
avatar
DRO N1nja
Forumember

Male Posts : 57
Reputation : 0
Language : English

Back to top Go down

Solved Re: Centering Tables

Post by RoNo June 8th 2010, 10:23 pm

RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum