Tabbed Tables

aliasRinse, Oakey, rickrollme
pronounsShe/Her
76written posts
pancakehouseearned bits
offlinecurrently
pancakehouse
Junior Member
pancakehouse Avatar
SIGMAR BLESS THIS RAVAGED BODY!
I am trying to code my own tabbed table for an application. But I couldn't get it right, so I was going to use a premade template. So I tried posting some premade templates, and all of them were wonked out and not displaying properly. I have the Style Tag and the Tabbed Sections in Posts plug-ins both installed. I'm wondering it's possible to pinpoint where and what's not happening? Something is conflicting with something else? Or have I just forgotten to do something with those plug-ins?

Here's the link for the thread I posted one of Leap's premade templates into: swallowingembers.boards.net/thread/95/hahaha-tabs

Thanks for taking a look in any case, I really appreciate it.

an original powers rp
Tabbed Tables written Jun 17, 2020 21:02:31 GMT via mobile
932written posts
gimmickearned bits
offlinecurrently
gimmick
Part of the Furniture
gimmick Avatar
All birds and men are sure to die but songs may live forever
I have a strong suspicion that it’s related to the fact that the opening [PTab=] tags have [attr] tags nested inside.

From past experience with my own templates, sometimes the nesting works, sometimes it breaks the template, and it may have to do with the version of one of those plugins on the site.

Edit: Also verify that your Styles plugin is above the PTabs plugin
Edit 2: Can you try swapping out all the instances of [PTab=[div title="lovers"][attr="class","hooksnattab"][i][attr="class","fa fa heart"][/i][/div]] so that it’s [PTab=Plain Text] and see what happens?
last edit on Jun 17, 2020 23:16:13 GMT by gimmick
aliasRinse, Oakey, rickrollme
pronounsShe/Her
76written posts
pancakehouseearned bits
offlinecurrently
pancakehouse
Junior Member
pancakehouse Avatar
SIGMAR BLESS THIS RAVAGED BODY!
Sorry for the late reply, and thanks so much for taking a look guys.

- I didn't make any changes to the template at all. And when I go into modify and look through the coding on it, I can't locate the unclosed tab in the place your image points one out. But I may be missing it.

- I did have the Tabbed plugin above the Style plugin in my plugins. When I swapped them like you suggested, it did make the templates look a little less broken. But still broken. I went ahead and posted one of your templates as well, since it was a little easier for me to dissect and work with. When I posted yours, with no changes to the template at all, it shows up okay.... but the tabs aren't showing up. So I posted a second reply and replaced the nested attribute tags with plain text per your suggestion. And now the text shows up, but only on the third tab. Here's the thread where you can see that: swallowingembers.boards.net/thread/98/testing-tabs Not sure if that's just because the styles are now missing or if it's part of the problem...

Also, the mini-profile I am using does have tabs in it. Could this somehow be the culprit? Could the whole problem be a clash with that? Or nah?

Again, thank you guys, I really appreciate it.
last edit on Jun 21, 2020 19:29:33 GMT by pancakehouse

an original powers rp
aliasRinse, Oakey, rickrollme
pronounsShe/Her
76written posts
pancakehouseearned bits
offlinecurrently
pancakehouse
Junior Member
pancakehouse Avatar
SIGMAR BLESS THIS RAVAGED BODY!
Okay, , I replaced the template. The tabs and everything seem to be working fine now. It looks like the vertical spacing isn't centered/"middled" in some places (like the Character Name, and the Descriptor), and the tabs aren't lined up with the body, but I think that could be fixed with a little tweaking. Although... out of curiosity, do you know happen to know why that may not be working? I tend to have little problems like that when I try to code my own templates with vertical-align:middle; and it typically never translates when I convert it from HTML to BBC -- I usually have to do replace it with line-spacing or a margin instead. 

And on an additional note, do you think instead of.... having to modify every premade template I found that has nested [attr] tabs in order for them to work (I'm pretty clueless with the tabbed tables coding if that isn't obvious at this point). You mentioned earlier that the breaking of the templates with the [attr] tags could be an issue with the version of the plug-ins? If I try installing different versions of the plug-ins and what-not, do you think that would fix this? 

Or alternatively, was it a quick/simple fix to take the nesting [attr] out of the tab and add that coding elsewhere? If it's a simple add/fix in order to make it work, I could probably do that. I should have posted the two templates separately so I could see what/where you moved it to, but I didn't. 

Thanks for being so incredibly helpful thus far. Hope you don't mind me picking your brain more.. a lot of coding is just over my head.
last edit on Jun 21, 2020 20:14:16 GMT by pancakehouse

an original powers rp
932written posts
gimmickearned bits
offlinecurrently
gimmick
Part of the Furniture
gimmick Avatar
All birds and men are sure to die but songs may live forever

Misalignment of tab and body: you have the template twice, but it looks like the css in the second post wasn't updated, and so it's overriding the correct CSS in the first post. If you delete that second post, the first one should look correct as far as the tabs aligning.


Off-center vertical spacing: your site css has a td{ vertical-align:top !important; } which is overriding every other instance of vertical-align: middle. You could remove that from your site css, but in case you don't know what that'll affect, it might be best to add an !important to the instances where you use it in your templates—that should counteract it in this template and in your own.


Plug-in version: It would. After playing around with it a bit, the last version of the Style Tag plugin that still works with nesting [attr] in PTabs is 2.1.0


De-nesting [attr]: If you’re still interested, it’s pretty simple. All you have to do is take whatever css you had within the [PTab=div class] and apply it to a .PT_Tabs_holder td class instead. You may have to tweak it depending on how many divs were nested within that [PTab=] though. But basically, if you have
[PTab=[div][attr="class","nested"]Tab[/div]]
[newclass=.nested]color: red[/newclass]

it would become
[PTab=Tab]
[newclass=.PTabs_holder td]color: red[/newclass]


Also, if there are any margins applied via div style (which do still work) rather than an attr class, you may have to move those into a newclass as well. So from
[PTab=[div style="margin-left: 10px"]Tab 1[/div]
[PTab=[div style="margin-left: 20px"]Tab 2[/div]

to
[newclass=.PT_Tabs_holder td:nth-child(1)]margin-left: 10px[/newclass]
[newclass=.PT_Tabs_holder td:nth-child(2)]margin-left: 20px[/newclass]

last edit on Jun 21, 2020 22:27:43 GMT by gimmick
Tabbed Tables written Jun 22, 2020 0:44:02 GMT via mobile
aliasRinse, Oakey, rickrollme
pronounsShe/Her
76written posts
pancakehouseearned bits
offlinecurrently
pancakehouse
Junior Member
pancakehouse Avatar
SIGMAR BLESS THIS RAVAGED BODY!
Aaaaah, thanks sooo much for all that information, Gimmick. Incredibly helpful, thorough, and simple enough for me to get. I can't wait to get back on and try and play with some of those things. Thank you!!

an original powers rp
3,084written posts
Kitten4uearned bits
offlinecurrently
Kitten4u
Part of the Furniture
Kitten4u Avatar
[nospaces]

[attr="class","infoBG"]
[attr="class","infoBG2"]
[attr="class","infoBack"]
[attr="class","infoTitle"][attr="class","fa fa-star-o"] threadarchived
[attr="class","infoDiv"]

[attr="class","infoBody"]

To keep the forum clean and so people know that all threads in certain areas are current and that the OP is likely to still have interest, we archive threads that haven't gotten posts for 2 weeks. This thread is being archived for that reason. If you would like this thread reopened, contact a staff member.