Posted by LF: Table/Background Help *sob*

Lethes (#187208)

Asshole
View Forum Posts


Posted on
2023-11-30 15:09:24
I've looked at nearly every guide on here and I still can't figure this out I'm working on some test HTML here: https://www.lioden.com/edit_post.php?topic=304429526615

My problem is that, when I expand the spoiler box, the writing goes outside of the table background. Anyone know how to fix this?



Hrt Icon 0 players like this post! Like?

Trace (#68847)


View Forum Posts


Posted on
2023-11-30 15:17:25
Is there any way you can post your raw code somewhere?



Hrt Icon 0 players like this post! Like?

Lethes (#187208)

Asshole
View Forum Posts


Posted on
2023-11-30 15:59:00
Uhh mayyybe- I'm not sure where I'd do that though ^^'



Hrt Icon 0 players like this post! Like?

Trace (#68847)


View Forum Posts


Posted on
2023-11-30 16:04:21
Ah, if it isn't any trouble, then you can use a Pastebin. Or you could share your code by using asterisks to stop the code from 'kicking in'. If you are uncomfortable sharing your code in public, feel free to drop me a DM.



Hrt Icon 0 players like this post! Like?

Lethes (#187208)

Asshole
View Forum Posts


Posted on
2023-11-30 16:10:39
I can send it here! The code isn't purely mine, I used a free template made by Quake and then simply tried to alter a few things ^^ I can link you to their original one as well, if that helps? Also, mine's very messy rip, sorry about that lol. Don't really know what I'm doing so I'm sure I messed a few things up.

-

<*table style="width:100%a;height:auto;border:3px dotted #000;"><*tr><*td style="background:url("https://i.postimg.cc/s2fs6Z65/5050880.png")"><*p style="text-align:center;color:#c9a7d6;font-family:'Georgia';"><*/p><*p style="text-align:center;color:#FFF;font-family:'Georgia';"><*span style="background:#555;border:none;float:left;width:90%;height:50px;margin:30px;margin-bottom:10px;margin-top:5px;font-weight:bold;padding:10px;color:#FFF;font-size:20px;">Lethes' Auctions<*/span>
<*span style="background: rgba(140, 140, 140, 0.9);border:none;float:left;width:90%;height:auto;padding:20px;margin: 5px 1px 10px 30px;">Hello and welcome to my auction thread! This is my first time trying to sell lions, so I'm glad you stopped by to take a look! Hopefully you'll find something you like ^^ If you have any questions, feel free to pm me.


<*u><*b>Rules<*/u><*/b>
- 1000 = 1
- No minimum increase
- Auctions last five days after they're started
- Only bid what you have
- No backing out, all bids are final after rollover
I may add to these over time!

<*u><*b>Accepted Items<*/u><*/b>
[*spoiler]I will always value things by the lowest branch/trading center price, unless it's something from the Oasis, then I'll go with the Oasis' value.

- Black Stallion
- Zebra Heart
- Poses
- IBF
- Some event currencies*
- Some decors
- Some backgrounds

Honestly, I accept many items, so if you have something in mind, just ask! I do accept some crafting items like gems and fossils and such (:

<*i>*For event currency, it depends on the month! Please ask me before bidding with currency, unless during February, July, and December. I will always accept currency from these months!<*/i>[*/spoiler]
<*font size=1>HTML by Quake#69866<*/font><*/span>

<*font size=1>HTML by Quake#69866<*/font><*/span>



Hrt Icon 0 players like this post! Like?

Trace (#68847)


View Forum Posts


Posted on
2023-12-01 01:03:54
Ah.. the coding conventions with span tags are not always the best. Span tags negate CSS styling inside their tags, so essentially you will have to rewrite everything once you are inside them. That said, I've reviewed your codes, fixed some errors including underline bold styling errors.. here is what I have for you. I'll write up an explanation with the code in the next post.






Lethes' Auctions

Hello and welcome to my auction thread! This is my first time trying to sell lions, so I'm glad you stopped by to take a look! Hopefully you'll find something you like ^^ If you have any questions, feel free to pm me.


Rules
- 1000 = 1
- No minimum increase
- Auctions last five days after they're started
- Only bid what you have
- No backing out, all bids are final after rollover
I may add to these over time!

Accepted Items




HTML by Quake#69866







Hrt Icon 0 players like this post! Like?


Edited on 01/12/23 @ 01:04:54 by Trace (#68847)

Trace (#68847)


View Forum Posts


Posted on
2023-12-01 01:18:39
Essentially what I have done is put another span tag inside the spoiler. In coding jargon, I would say I have nested another span tag inside of the spoiler, so it would be a span inside a spoiler inside a span.

When before, if you put a spoiler into span, it 'turned off' all the CSS styles that you have coded on top. Instead what you could do, is put another span inside the spoiler and define the same properties/styling as the translucent box underneath. Here is the raw code (remove the asterisks as appropriate)

------------------------- CODE START -------------------------------------


<*table style="width:100%;height:auto;border:3px dotted #000;">
<*tr>
<*td style="background:url('https://i.postimg.cc/s2fs6Z65/5050880.png')">
<*p style="text-align:center;color:#FFF;font-family:'Georgia';">

<*span style="background:#555;border:none;float:left;width:90%;height:50px;margin:30px;margin-bottom:10px;margin-top:5px;font-weight:bold;padding:10px;color:#FFF;font-size:20px;">Lethes' Auctions<*/span>

<*span style="background: rgba(140, 140, 140, 0.9);border:none;float:left;width:90%;height:auto;padding:20px;margin: 5px 1px 0 30px;">Hello and welcome to my auction thread! This is my first time trying to sell lions, so I'm glad you stopped by to take a look! Hopefully you'll find something you like ^^ If you have any questions, feel free to pm me.


<*u><*b>Rules<*/b><*/u>
- 1000 = 1
- No minimum increase
- Auctions last five days after they're started
- Only bid what you have
- No backing out, all bids are final after rollover
I may add to these over time!

<*u><*b>Accepted Items<*/b><*/u>
[*spoiler]<*span style="background: rgba(140, 140, 140, 0.9);border:none;float:left;width:90%;height:auto;padding:20px;margin: 0px 1px 0 30px;">I will always value things by the lowest branch/trading center price, unless it's something from the Oasis, then I'll go with the Oasis' value.

- Black Stallion
- Zebra Heart
- Poses
- IBF
- Some event currencies*
- Some decors
- Some backgrounds

Honestly, I accept many items, so if you have something in mind, just ask! I do accept some crafting items like gems and fossils and such (:

<*i>For event currency, it depends on the month! Please ask me before bidding with currency, unless during February, July, and December. I will always accept currency from these months!<*/i><*/span>[*/spoiler]<*/span>

<*br><*p>HTML by Quake#69866<*/p><*br><*/td><*/tr><*/table>

------------------------- CODE END-------------------------------------



Big big disclaimer: I figured I might as well add a disclaimer here. There are some depreciated tags like font tag, that is no longer used in recent coding. I'm sure this will be phased out some time in the future (of Lioden). Another thing to add, span tags are usually not used in this way in other coding environments, nor do I think it is the best practice. However, I am aware that it is the most common way to create boxes in the forums here, and I don't intend to break this convention? Let me know if you have any further questions.




Hrt Icon 0 players like this post! Like?

Lethes (#187208)

Asshole
View Forum Posts


Posted on
2023-12-01 08:57:36
Eep, oh my goodness thank you so much!! Your explanation makes sense as well I believe. I had no idea that the spoiler would simply stop the coding from working within it. Ngl I really need to work more on actually learning how coding works lol. Most of the time I just look at guides and hope I'll understand from them, but they don't always cover anything. Which is understandable, it seems there's a lot to coding....

Thank you again for your help! Could I repay you for your time in any way? o:



Hrt Icon 0 players like this post! Like?

Trace (#68847)


View Forum Posts


Posted on
2023-12-02 02:31:44
The same logic should expand to CSS in dens (and even beyond Lioden). Also it's not the spoiler stopping the code from working in it, it's the span tag that is outside the spoiler.

For visualization:

this is a span tag
this is the spoiler button + contents
this is another span tag


The red span tag negates/resets the CSS that has been applied to the rest of the 'boxes'. Similarly, the green span tag should apply the same logic if you put another second spoiler button in it. It is a wee bit convoluted. Not going to lie.

There is quite a bit to coding. But you are on your first step learning more about it, so kudos to you!

Don't worry about it. I'm glad I could help. Enjoy the rest of your December! Feel free to drop me a DM if you would like me to have a look at anything coding related you have done. I'd be curious.



Hrt Icon 0 players like this post! Like?

Lethes (#187208)

Asshole
View Forum Posts


Posted on
2023-12-02 07:38:06
Ooh I see. You're right, that is rather convoluted O.o But good to know that the issue is just making sure there is a span tag within a spoiler box.

If I ever get around to making my own CSS for my den page like I want to, I'll definitely DM it to you for some possible proofing! I hope you have a good rest of December as well, and enjoy the holidays if you celebrate ^^



Hrt Icon 1 player likes this post! Like?







Memory Used: 638.70 KB - Queries: 0 - Query Time: 0.00000 - Total Time: 0.00363s