Page 1 of 1

Format Certain Text in Label

Posted: Tue Dec 15, 2015 9:39 pm
by Jack Bua

I need to bold a particular word of text in a label, but not all of the label's text. How do I do that?


Format Certain Text in Label

Posted: Thu Dec 17, 2015 5:24 pm
by Serhii Kulibaba

Hello Jack,

You can use pseudoselector "first-letter" for the first letter:
https://css-tricks.com/almanac/select...

But it is impossible to use css for the part of the text.


Format Certain Text in Label

Posted: Thu Dec 17, 2015 5:47 pm
by Jack Bua

What about html formatting? I am only talking about simple things like bold, underline and italic.


Format Certain Text in Label

Posted: Fri Dec 18, 2015 8:23 am
by Evgene Karachevtsev

Hello Jack,

You may drag/drop the HTML component and edit it like this:
pre
span class="label label-default"
span class="firstPart"First/span
span class="secondPart"second/span
/span%children%/pre
then add/use a separate file for CSS classes, adding whatever style you want:
pre.firstPart {
font-weight: 100;
color: blue;
}
.secondPart {
font-weight: 700;
color: red;
}/pre


Format Certain Text in Label

Posted: Thu Aug 31, 2017 7:33 am
by Hero Render

On ionic,
I want to BOLD specific part of the text, I cant use HTML for rapid and easy dev .


Format Certain Text in Label

Posted: Fri Sep 01, 2017 9:20 am
by Illya Stepanov

For this you can use CSS in your project for modifying the text string properties:

precode
.bold {

Code: Select all

 font-weight: bold; 

}
/code/pre

and for your Text component on the page add a Class: codebold/code


Format Certain Text in Label

Posted: Mon Sep 04, 2017 12:35 am
by Hero Render

no I want to bold a specific part of my text, not on HTML...
for example, I want to bold the high lighted part.
Image


Format Certain Text in Label

Posted: Tue Sep 05, 2017 4:18 pm
by Serhii Kulibaba

Hello,

It is impossible to use different styles in the only one HTML tag (like a label, a button, etc.). You have to separate your text to different tags for that.