Trying to display the text of the UILabel in three different lines:
First Line
Second Line
Third Line
But is showing up in single line "First Line Second Line Third Line"
Can the label display multiple lines?
Are you talking about form labels in HTML?
You can add line breaks after each part, or you can wrap each "line" as a span. I think anything else may be invalid.
example:
<label for="some_input">First Line<br />Second Line<br />Third Line<br /></label>
<input id="some_input" type="checkbox" name="input1" />
Or:
<label for="some_input"><span>First Line<\span><span>Second Line<\span><span>Third Line<\span></label>
<input id="some_input" type="checkbox" name="input1" />
then add the CSS:
label span {
display: block;
}
I am using this lable in the gridview. on row data bound i am replacing chr(10) and chr(13) WITH
Related
Using Thymeleaf th:each loop, whitespace is removed (or can't be added).
Thymeleaf code:
<div>
</div>
I expected:
<div>
Link 1
Link 2
Link 3
Link 4
Link 5
</div>
but html rendered below.
<div>Link 1Link 2Link 3Link 4Link 5</div>
How to add whitespace (in html file new line) using Thymeleaf th:each?
My Thymeleaf version is 3.0.12.RELEASE
If you want the links to be arranged horizontally with a single white space between them (as opposed to arranging them vertically using display:block) then you can use the Thymeleaf synthetic <th:block> element (documented here):
<div>
<th:block th:each="item : ${items}">
</th:block>
</div>
This will give you the same layout as you show in your question, when you run the first code snippet.
Update:
You can also use <span> instead of <th:block>, if you prefer:
<div>
<span th:each="item : ${items}">
</span>
</div>
This will give you the same end result (links arranged horizontally with a space between them), but the HTML generated to produce this layout will, of course, be slightly different.
I just wanted to know if there´s any way to reduce the space between to tables (one on top of the following) in an Rmarkdown sheet. I´ve tried doing
<div style="width: 100%;margin-top: 1px;margin-bottom: 1px;">
<div style="width: 63%;float: bottom;margin-top: 1px;margin-bottom: 1px;">
```{r, echo=FALSE, warning=FALSE,message=FALSE, results='asis'}
#here the two tables I need to print at the Markdown
But it doesn´t work. Do you have any sugestions? Thanks a lot!
The minimal distance between two tables is one line - otherwise they would be merged (as you can see in my example):
Example with 1 line distance and without one line distance
What is the output format of your md document?
I could finnaly solve it by using a negative margin-top for the second table.
<div style="width: 100%;margin-top: 50px;margin-bottom: 0px;">
{r, echo=FALSE, warning=FALSE,message=FALSE, results='asis'}
#one datatable here
</div>
<div style="width: 66%;float: bottom;margin-top:-19px;margin-bottom: 50px;">
{r, echo=FALSE, warning=FALSE,message=FALSE, results='asis'}
#the otherone here (negative margin-top)
</div>
I am trying to change the font size of a text in mat-toolbar, but nothing seems to work . In the plunker example i have 2 spans 'AAA product' and 'some long description' . how do i change the font size of these elements . applying style to the span doesnt seem to take effect. Any help is much appreciated.
<button mat-button (click)="sidenav.toggle()" >
<mat-icon>menu</mat-icon>
</button>
<span>AAA product </span>
<span class="test"></span>
<span style="font-height=10px">Some Longer description</span>
<span class="fill-remaining-space"></span>
plunker link
Use CSS:
<span style='font-size:333%;'>AAA product</span>
There's some more info on https://material.angular.io/guide/typography
I'm getting last columns in radgrid cut off. The grid is scrollable and sum of column widths is definitely wider than given width. The cut columns are of course in the page source. there is 18 columns like the one below. Why could it be? Thank you!
<telerik:RadGrid runat="server" ID="rg" AutoGenerateColumns="false" AllowSorting="true"
AllowFilteringByColumn="true" Skin="Telerik" Width="1000px" AllowPaging="true"
PageSize="20" OnNeedDataSource="needData">
<ClientSettings Scrolling-FrozenColumnsCount="2" Scrolling-SaveScrollPosition="true"
Scrolling-UseStaticHeaders="true" Scrolling-AllowScroll="true" />
<HeaderStyle Width="100px" />
<MasterTableView Width="100%" TableLayout="Fixed" >
<PagerStyle Position="TopAndBottom" Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" />
<Columns>
<telerik:GridBoundColumn DataField="report_number" HeaderText="Report #" AutoPostBackOnFilter="true" ShowSortIcon="false"/>
resolved like this: first, doctype issue. removing "transitional" part from the declaration solved cutting the column in the middle. adding a fake column with headertext="" and no data after the last I need forced the last column with data to show.
just in case: MasterTableView width=101% did not help (found this someplace else)
Imagine a webshop where you can buy custom clothes. The user is asked to choose two kinds of colors for his new t-shirt: primary and secondary color. This is done by 2 radiogroups. Depending on the colors the user chooses, an image will be shown, showing the shirt in the selected colors.
My problem is pretty similar, so I will describe it a little bit more abstractly:
I have 2 radiogroups, with 4 radio buttons each on my website:
group 1: A B C D,
group 2: A B C D
Now i want to display an image on my website, depending on the combination of those two groups.
i.e.: user selects A from group 1 and B from group 2 --> display image1
i.e.: user slects A from group 1 and A from group B --> display image2
i.e.: user selects B from group 1 and nothing from group B --> display image3
and so forth...
Primary color:
<label><input type="radio" name="Color1" value="red" id="Color1_0" />Red</label>
<label><input type="radio" name="Color1" value="green" id="Color1_1" />Green</label>
<label><input type="radio" name="Color1" value="blue" id="Color1_2" />Blue</label>
<label><input type="radio" name="Color1" value="champagne" id="Color1_3" />Champagne</label>
Secondary color:
<label><input type="radio" name="Color2" value="red" id="Color2_0" />Red</label>
<label><input type="radio" name="Color2" value="blue" id="Color2_1" />Blue</label>
<label><input type="radio" name="Color2" value="purple" id="Color2_2" />Purple</label>
<label><input type="radio" name="Color2" value="champagne" id="Color2_3" />Champagne</label>
<img id="customimage" src="images/image1.jpg" />
Any ideas on how to do this?! After three days of thinking and Google-research, I've got nothing so far :(
Maybe an Java array will be needed??
I'm open for suggestions :)
You can use jQuery (or a similar framework) to get an event in JavaScript every time the radio button selections are changed, and update the image tag (again using e.g. jQuery) with the URL of the newly selected image.
Changing the image source using jQuery
I would standardize on the names of the images (if you have that level of control) so that you can form the image name based just on the selected radio buttons (e.g. Shirts-Red-Large.jpg), otherwise you can lookup the appropriate image URL using an Ajax query.