
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019 08:18 PM
Hi Experts,
Anyone knows how to adjust the line height of an html field
I want to fix the line spacing to 1.5 i.e. Line height attribute in CSS however not sure how to do it on text field of knowledge article
Solved! Go to Solution.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 07:34 PM
I found the answer to this
Since kb_view is a UI Page we need to create a new Custom CSS Style sheet in CMS Application and then call the custom CSS inside the HTML code of this UI Page
Make sure your custom CSS is overriding those elements only that you may want to change. In my case it was a line-height element that was set to 1.4 by out of the box CSS Style sheet
PS : The out of the box CSS Style sheet is native to platform so you may not be able to access it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 05:14 AM
Hi sachin,
try below code:
.container {
line-height: 2.5ex;
height: 7.5ex; /* 2.5ex for each visible line */
overflow: hidden;
}
or
div.a {
line-height: normal;
}
div.b {
line-height: 1.6;
}
div.c {
line-height: 80%;
}
div.d {
line-height: 200%;
}
you can take help from below link also
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
https://www.w3schools.com/cssref/pr_dim_line-height.asp
https://css-tricks.com/fun-line-height/
https://iamvdo.me/en/blog/css-font-metrics-line-height-and-vertical-align
NOTE: Mark correct or helpful if it helps you.
Warm Regards,
Raj patel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 07:34 PM
I found the answer to this
Since kb_view is a UI Page we need to create a new Custom CSS Style sheet in CMS Application and then call the custom CSS inside the HTML code of this UI Page
Make sure your custom CSS is overriding those elements only that you may want to change. In my case it was a line-height element that was set to 1.4 by out of the box CSS Style sheet
PS : The out of the box CSS Style sheet is native to platform so you may not be able to access it