Search…

X3 Photo Gallery Support Forums

Search…
 
ClaudioMaffucci
Experienced
Topic Author
Posts: 37
Joined: 12 Mar 2018, 06:22

Gallery - Description box

29 Jul 2024, 10:13

Hi,
Can I format the text in the 'Description' box?
Thank you in advance for your support.
Regards,
Claudio
Attachments
IMG_6421.jpeg
IMG_6421.jpeg (135.94 KiB) Viewed 1616 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Gallery - Description box

29 Jul 2024, 23:50

Hi Claudio,
ClaudioMaffucci wrote:Can I format the text in the 'Description' box?
The "Description" field supports basic html text formatting tags like <strong><em><br><span style="color:#990000"> etc. For example:
Code
<strong>This is some important information</strong>
<br>
<br>
This text is <em>emphasized</em>. And <span style="color: #990000">this is red color</span>, bye!
 
nampara17
Posts: 7
Joined: 28 Jul 2024, 16:21

Re: Gallery - Description box

30 Jul 2024, 09:41

Can we use <div>'s and classes?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Gallery - Description box

30 Jul 2024, 23:10

nampara17 wrote: Can we use <div>'s and classes?
<div> no, because it's block-level element, and isn't technically allowed by html (browsers) to go inside inline elements like <p> paragraphs. However, why not just use <span> instead of <div>? There is nothing you can do with <div> that you can't do with <span>.

You can use classes yes.
Code
<span class="myclass"></span>
You need to be careful about what you do with styles though. Remember, the description may display in the layout and in the popup, so you can't add styles that look nice in one place but not the other ... Unless you only display descriptions in the popup for example. That's why by default, formatting should be limited to "rich text formatting" (colors, fonts, bold, italic etc).
 
ClaudioMaffucci
Experienced
Topic Author
Posts: 37
Joined: 12 Mar 2018, 06:22

Re: Gallery - Description box

02 Aug 2024, 03:45

mjau-mjau wrote: Hi Claudio,
ClaudioMaffucci wrote:Can I format the text in the 'Description' box?
The "Description" field supports basic html text formatting tags like <strong><em><br><span style="color:#990000"> etc. For example:
Code
<strong>This is some important information</strong>
<br>
<br>
This text is <em>emphasized</em>. And <span style="color: #990000">this is red color</span>, bye!
Thank you very much for the support.
Regards,
Claudio