One possible CSS selector for that would be td h2 (which selects a secondary heading inside a table cell).
td h2
It's the part of CSS that defines what you're styling. In a global script, you'd do something like this:
$PAGETEXT := "<style> td h2 { color: red; } </style>" + $PAGETEXT
td h2 in the global script successfully changed the font color of My Inventory. So thanks for that. Now I'm on the bigger and better things... two questions, if you don't mind:
(1) If td h2 controls the text of my inventory, what controls the BORDER color? Is it accessible, and if so, why couldn't I do the same thing to change the color of that?
(2) Does anyone know of a hex code color that is transparent? If so, I'd add to the global script that part as well, changing at least the font to transparent, and if possible, the border as well.
with brackets replaced by <> obviously
It certainly HID the border. It also hid the entire inventory, including all my items, making it impossible to click on them, lol.
That's the start of it, but that's just making the table and all of its contents invisible. Fortunately, the way visibility works, you're able to specify elements inside a hidden element to be visible again. This CSS hides and unhides elements to make this:
table, table table tr:nth-child(3) td:nth-child(2) { visibility: hidden; } table table tr td { visibility: visible; }
Rather than start a new thread, I'd like to ask a follow up on this. The above script does indeed make the inventory border disappear, which is great, but suppose I still wanted the word "Inventory" to be visible, how could I do that?
I do not care in the slightest how that is accomplished, other than I don't want it looking like a clickable link. If it's adding text after the links at the bottom I'm okay. I may even be cool with it being a dead link, as long as I can remove the dot next to the link for ONLY that link.
Any suggestions are welcome as I investigate this. I noticed you did say you can specify which elements remain visible, but of course I don't know the names of the actual elements.
As usually, thanks for all replies and support.
Figured it out, never mind. Here is what I added:
table td:nth-child(4) { visibility: visible ; }
So apparently child(4) is the words "My Inventory." So here is my total script, which results in all my items being visible, underneath the word Inventory, with a transparent border (with brackets replacing less than and greater than symbols):
$PAGETEXT :="[style] table, table table tr:nth-child(3) td:nth-child(2) { visibility: hidden; } table table tr td { visibility: visible ; } table td:nth-child(4) { visibility: visible ; } [/style]" + $PAGETEXT
So this one is solved.
The border is a bunch of images in the edgemost cells of the inventory table. You can't reliably change the actual images with CSS, but you can load secondary images as background content and push the originals out of view (which is what this does using versions with transparent backgrounds). You could use an actual CSS border on the inventory table, too, but you'd still need to hide the original border images.
Transparent hex codes aren't fully supported, but there are other options, including the keyword "transparent" for full transparency and rgba colors (like "rgba(255, 127, 127, .5)") for intermediate values.
Nevertheless, I'll probably have more questions about this later, because I'm still not sure if I want to include items or not in this game. But much appreciated!
Do you mean this article?
Scripting Variable Items
Although, I suppose what I could do is just paste each picture above the item link, and have a master link on every page that functions like a satchel or a pocket or something where you hold your items.
Is there a way to just make the entire Inventory box disappear, leaving only the item icons themselves? I ask because I know that you can do exactly that with the title of every page in the Global Page script (thanks to Ogre11), so I'm just wondering if there is a way to do it. As always, thanks for any input.