16 posts
bits
She/Her
SIGMAR BLESS THIS RAVAGED BODY!
|
Post by RINSE on Jun 17, 2020 18:43:40 GMT
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.
|
|
|
Post by 혼돈 중립 elli on Jun 17, 2020 19:40:57 GMT
Have you made any modifications to these templates? It looks like you might have an unclosed tag: i.imgur.com/LwQxcDw.pngIf you haven't made any changes, we'll continue investigating.
|
|
610 posts
bits
For a moment, nothing happened. Then, after a second or so, nothing continued to happen.
|
Post by gimmick on Jun 17, 2020 21:02:31 GMT
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?
|
|
16 posts
bits
She/Her
SIGMAR BLESS THIS RAVAGED BODY!
|
Post by RINSE on Jun 21, 2020 19:28:03 GMT
Sorry for the late reply, and thanks so much for taking a look guys.
혼돈 중립 elli - 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.
gimmick - 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.
|
|
610 posts
bits
For a moment, nothing happened. Then, after a second or so, nothing continued to happen.
|
Post by gimmick on Jun 21, 2020 19:50:02 GMT
RINSE - Yeah, I think it's because the styles are no longer there. Can you try grabbing the same template again? I swapped it out just now with an updated version that doesn't use nested [attr]'s.
|
|
16 posts
bits
She/Her
SIGMAR BLESS THIS RAVAGED BODY!
|
Post by RINSE on Jun 21, 2020 20:13:49 GMT
Okay, gimmick , 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.
|
|
610 posts
bits
For a moment, nothing happened. Then, after a second or so, nothing continued to happen.
|
Post by gimmick on Jun 21, 2020 22:24:57 GMT
RINSE 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]
|
|
16 posts
bits
She/Her
SIGMAR BLESS THIS RAVAGED BODY!
|
Post by RINSE on Jun 22, 2020 0:44:02 GMT
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!!
|
|
|
Post by Kitten4u on Jul 5, 2020 21:58:52 GMT
[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.
|
|