Vincent,

I apologize. I didn't mean to be unrespectfull, it's not my style (since
we're talking about styles :) ). 
But...it usually takes longer to hit a db, write some sqls and get the
expected result than to write align="center", or any style property, but
that's not the point.
The css I use is colibri.css through a style.css include statement.
Strange thing is that despite I am writing this in my script:

(% style="background-color:red;align:center" %)

The html code produced at the end is :

<table style="background-color: red;">

Where the align attribute is simply removed. Also, some <tbody> tags are
added.  

What I meant by locked is the following: why simple html like this:
"<table align="center"><tr><td>test centering</td></tr></table>"
Cannot be rendered according to W3C standard?
I haven't been through the details of xwiki rendering but it looks like
xwiki css defines styles for at html element level (i.e for all table, all
h1, etc.. for instance .table { text-align: left}) So basically, a custom
table (any table) falls under the rules of theses xwiki css.
If you had defined a .xwikitable set of attributes instead, then the style
would only apply to a table using class="xwikitable" and a custom table
would follow whatever style was defined by the web developper. 

Anyway, I just tried that margin trick I found on a forum and that you just
gave me. It works fine.

Again, I didn't mean to show any lack of respect. I was just a bit
frustrated. That happens. But you could concede me that xwiki documentation
is not well structured and organized, both in its content and presentation.
I know it's a challenge, a daunting task, but at some point it's necessary.

Thanks

Marc

-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de
Vincent Massol
Envoyé : samedi 20 novembre 2010 15:26
À : XWiki Users
Objet : Re: [xwiki-users] Table Alignement


On Nov 20, 2010, at 3:08 PM, Vincent Massol wrote:

> Hi Marc,
> 
> On Nov 20, 2010, at 1:59 PM, Marc AGATE wrote:
> 
>> Hi !
>> 
>> 
>> 
>>        I've been struggling for hours trying to get a Html table centered
>> on a wiki page. I tried all the suggested syntax I found in the very
messy
>> Xwiki documentation
> 
> What is messy? What do you suggest to make it less "messy"? Can you help?
> 
>> (i.e, using style="etc.", then using class="myclass")
>> and I also tried to get rid of all table references in the colibri.css
file,
>> but STILL, my table is stuck on the left. It's just driving me nuts to be
>> able to hit a database in a record time and to spend hours to get the
>> resulting table centered! 
> 
> Not sure why you think using a database is more complex than using CSS....
;)
> For me it's much harder to use HTML/CSS than hitting a DB!
> 
>> Any clue? Why is all the rendering locked this way? What's the point ?
> 
> What do you propose to unlock it (whatever you mean by this)?
> 
> Regarding the table centering use firebug if you're on FF to find the
correct CSS.

Just because I'm good (despite your not very respectful email), here's the
result of my 2 minutes investigation with google and firebug (and people who
know me know I don't know crap about HTML/CSS ;)):

(% style="margin-left: auto; margin-right: auto;" %)
|=column1|=column2
|cell1|cell2

For the record I've found this info on
http://theodorakis.net/tablecentertest.html

Hope it helps,
-Vincent

> 
> Thanks
> -Vincent
> 
>> By the way, I am running XWiki Enterprise 2.5.1.32531
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> Marc
> 

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to