BB Code img labels?

Started by BlastingCap, October 03, 2017, 08:30:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BlastingCap

I looked through the tutorials on BB code, and I'm wondering if there is a way to do either of the following:

1) Add a caption to an image that is embedded with the img code, or
2) make a label appear upon hovering over the embedded image

I figure that 1 is probably unlikely, but I did some digging and found that you can add meta data to an img with the title="text here" code within the img brackets. However, I have been unable to get this to work, so I'm wondering if it's not supported. I can achieve the same result with a table, but I was wondering if there was a more elegant way of doing it.

Anyone a little more familiar with BB code than I am?

Avis habilis

You can kludge a hover text for an image by wrapping it in an [ acronym ] tag. For instance, this:




is created with this code:

[ acronym="Man sticking his head in a giant mug of coffee" ][ img]https://i.imgur.com/jHBCvQr.jpg[/img ][/acronym ]

BlastingCap

Definitely the option number 2 I was looking for. Thanks Avis!

Now to decide if I want to go with the caption/table idea or the hover.

Avis habilis


NightLux

Quote from: BlastingCap on October 03, 2017, 08:37:48 AM
Definitely the option number 2 I was looking for. Thanks Avis!

Now to decide if I want to go with the caption/table idea or the hover.

The table would look something like this:


Man sticking his head in a giant mug of coffee



[table]
[tr][td][img]https://i.imgur.com/jHBCvQr.jpg[/img][/td][/tr]
[tr][td][center]Man sticking his head in a giant mug of coffee[/center]
[hr][/td][/tr]
[/table]


I added the horizontal row since tables in BBCode are borderless but you could just as easily remove that entirely.  And I just centered the text - it could be formatted however you want.
[tr][td]
[/td][td]
RP Status: Seeking new partners
RL Status: Looking forward to my birthday!
Solo Status: 0 (due) / 3 (total)
In Development: 0
Group Due: 0 (due) / 0 (total)
[/td][/tr][/table]

Kye

You can also do something like this using BBcode without the table if you are floating the image.

Man sticking his head in a giant mug of coffee

[float=left][img padding=10]https://i.imgur.com/jHBCvQr.jpg[/img] [center]Man sticking his head in a giant mug of coffee[/center] [/float]

BlastingCap

That may work better than my table method, Kyrsa. It does the same thing and it's a lot less BB code to use. Thanks!

Kye