Hey gang, I'm a self-taught html gremlin having trouble with html tables within a page. For some reason the rowspan and colspan tags aren't doing anything, which is kinda messing up my format. I'm trying to go for a system where I can do multiple mechanics fields on one side and a single large spell description on the other, but it winds up being
Title |
Lorem ipsum dolor sit amet, vis ut suas liber. Qui abhorreant liberavisse et, ferri graece iisque ut nam. Altera platonem euripidis sea an, eam ad minimum singulis. Pro ad solum vivendo, te sea pertinax efficiantur. Eum ferri numquam ne, albucius ponderum ne has. Sit accusam ancillae at, at nisl nominavi ponderum nec. |
Mechanic1 | |
Mechanic2 |
Instead of
Title |
Lorem ipsum dolor sit amet, vis ut suas liber. Qui abhorreant liberavisse et, ferri graece iisque ut nam. Altera platonem euripidis sea an, eam ad minimum singulis. Pro ad solum vivendo, te sea pertinax efficiantur. Eum ferri numquam ne, albucius ponderum ne has. Sit accusam ancillae at, at nisl nominavi ponderum nec. |
Mechanic1 | |
Mechanic2 |
On the actual page. I'm really not sure why the second one appears to work here. Any thoughts as to what I'm doing wrong?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Rowspan and Colspan don't work.
Are you trying to accomplish this?
They are among us!
XCom: Defiance - Campaign of the Month November 2016
It'd help if you'd copy the actual code or (even better) link to an example page on your campaign?
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
cgregory I've been making extended use of the rowspan and colspan in textile? E.g. the tables in https://knights-of-the-realm-1.obsidianportal.com/wikis/battle-system-amended
In textile, the first table looks like this:
Which gets translated to this HTML:
So I'm pretty sure that rowspan and colspan work.... (PS is this editor dumb or what? I insert a code snippet. Which gets laid out perfectly. Previews neatly laid out. Then I hit OK and get the above mess???)
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
@cgregory That's exactly what I'm trying to accomplish. When I try it I wind up with this.
Code snippet:
Follow the link to see how it renders on my page. How did you get it to look nice on yours?
I'm not sure how you're editing (are you using textile or the newfangled editor?) but when I look at the source code of your page, the rowspan did not make it into the actual website code. I'm GUESSING it's something to do with the newfangled editor, but I'm not sure. I personally prefer textile by a mile and then some, as it's easier to predict what it will or will not do.
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
Ok so the Texttile colspan/rowspan works but pure html colspan/rowspan does not. That would mean that html generated from the textile parser doesn't go through the same parsers as pure html.
They are among us!
XCom: Defiance - Campaign of the Month November 2016
Guess so! Just made a small test page, and indeed the colspan gets stripped out if I enter raw HTML.
Annoying and just plain silly, but there it is.
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
That's what I'm trying to accomplish. How did you do that? Is it possible when using CKEditor?
Sigh. The table align attribute doesn't work either, does it? It works great in the preview in CKEditor, but apparently the evil parser strips it out.
@calion As many have said, the ckeditor is buggy and most of us just use the old textile editor.
Just trying to help out.
Sigh. I would, too, except that I want my players to write the Adventure Logs, and good luck getting them to use Textile. I don't mind background hacking to fix things, but apparently that's impossible.
Update: Centering the entire table is possible with CSS.
I encourage my players to use the Adventure Log, but i don't expect any of them to do any markup, whether CSS or CKeditor. I'll add that in afterwards.
Ptolus, City by the Spire - 2016 Campaign of the Year
"Please pay attention very carefully, because this is the truest thing a stranger will ever say to you: In the face of such hopelessness as our eventual, unavoidable death, there is little sense in not at least TRYING to accomplish all your wildest dreams in life." - - Kevin Smith
Sure. But even doing basic text entry is much less intuitive in Textile.
So I've hacked up a substitute for the lack of colspan, but my next question is: How do I get rid of table borders?
http://syfaerun.obsidianportal.com/adventure-log/adventure-log-template
Well, again it's easy to do in css. use the border property.
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
Yeah, I figured it out. I should have done that before asking.
No problem. I'd be able to help more if you'd consider using textile.
GM: https://knights-of-the-realm-1.obsidianportal.com/ - a Greater Pendragon Campaign
GM: https://sagaofthenorth..obsidianportal.com/ - a Dungeon World Campaign
Player/Scribe: https://thepriceofimmortality.obsidianportal.com/ - a Pathfinder Campaign
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane." - Marcus Aurelius
Sure. But getting my players to edit tables in Textile…yeah.
There are a couple of tricks to making textile tables easier to read and edit for your players, I find a lot of people try and make their textile tables use a minimum of space, but I find adding in lots of extra spaces makes it much easier for my players (and myself) to read the table and enter data.
At the end of the day my players chose to stick with the textile rather that use the CkEditor, because the textile offers features that the CkEditor doesn't.
Plus their are plenty of tools that allow them to convert an excel table into a textile table with a click of a button.
They are among us!
XCom: Defiance - Campaign of the Month November 2016
Thanks for the help. I think I've got it working for now, even in CKeditor. I just broke things up into two tables.
I'm having a new trouble. I'm trying to use Table IDs, as described at HTML Tables. I'm using <table id="head">, but that doesn't seem to be showing up on the published page. Is the parser stripping that out, or am I doing something wrong?
If I remember correctly, you can't use the id tag on anything for OP.
Johnprime
Where the west is really wild!
The Valley of Life
You are correct John. Just use classes instead of IDs. You can achieve the same effect.
They are among us!
XCom: Defiance - Campaign of the Month November 2016
Thanks; but I'm unclear how to use nth-child with classes. I'm trying to get back the zebra striping that seems to have disappeared from OP tables in the last few weeks, with something like this:
table#t01 tr:nth-child(even) {
background-color: #eee;
}
table#t01 tr:nth-child(odd) {
background-color: #fff;
}
I actually use cut/paste to create all of my tables, then I go back through and edit the background color for every other line. (It's only three letters.)
Ptolus, City by the Spire - 2016 Campaign of the Year
"Please pay attention very carefully, because this is the truest thing a stranger will ever say to you: In the face of such hopelessness as our eventual, unavoidable death, there is little sense in not at least TRYING to accomplish all your wildest dreams in life." - - Kevin Smith
Ugh. What a pain. Alright, I guess I will. What in the world changed, anyway?
My tables automagically alternate shading, using nth child css etc.
Here is an example: http://alfaysia.obsidianportal.com/wikis/imperial-temple
Here is my code
/* TABLE STANDARDS */table {margin:0px auto;}
#content table{background-color:#white; border-style:solid; border-color:#1e90ff;}
#content tr:nth-of-type(1){background:#1e90ff;}
#content tr:nth-child(even) {background-color:#ddd}
#content table {border-collapse:collapse;}
Unconquered Kingdoms, July 2016 CotM
Thats my custom CSS for the campaign.
Unconquered Kingdoms, July 2016 CotM