# 45691 - WebLabel with Font Styles Underline does not show Underline in Browser

**URL:** <https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229>\
**Category:** Web\
**Created:** [October 29, 2016, 4:08pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229 "2016-10-29T16:08:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hal\_Gumbert](https://forum.xojo.com/user_avatar/forum.xojo.com/hal_gumbert/32/160_2.png) [@Hal\_Gumbert](https://forum.xojo.com/u/Hal_Gumbert)\
**Post date:** [October 29, 2016, 4:08pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/1 "2016-10-29T16:08:57Z")

</div>

I just submitted a Web Bug report: \<[https://xojo.com/issue/45691](https://xojo.com/issue/45691)\> - WebLabel with Font Styles Underline does not show Underline in Browser

Example Project: [CampSoftware - Developer of Custom Database Driven Apps](http://CampSoftware.com/files/LongTerm/Xojo/WebLabelUnderline.xojo_binary_project)

![](http://CampSoftware.com/files/LongTerm/Xojo/WebLabelUnderline.png)

Steps: - Drag a WebLabel to a WebPage.

- Create a Style with a Font Style set to Underline.
- Apply the Style to the WebLabel.
- Run and see the label with no underline.

I didnt test the other Font Styles, but @Tim Dietrich tried all styles and only Bold and Italic work. Underline, StrikeThru, and the last one do not work.

Expected Result:  
The WebLabel to be underline.

Actual Result:  
The WebLabel is not underlined.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [October 29, 2016, 6:06pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/2 "2016-10-29T18:06:50Z")

</div>

Have you tried with other browsers?

---

<div class="post-metadata">

**Author:** ![Hal\_Gumbert](https://forum.xojo.com/user_avatar/forum.xojo.com/hal_gumbert/32/160_2.png) [@Hal\_Gumbert](https://forum.xojo.com/u/Hal_Gumbert)\
**Post date:** [October 29, 2016, 6:43pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/3 "2016-10-29T18:43:27Z")

</div>

Thanks for that idea Greg. Just tested and it’s not underlining in Safari, FireFox, and Chrome. I’d assume it not StrikeThru-ing, and one to the right of StrikeThru too.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [October 29, 2016, 8:42pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/4 "2016-10-29T20:42:22Z")

</div>

Hm. I know this worked recently because I used it in a project… I’ll look at the case when I get a sec.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [October 29, 2016, 9:10pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/5 "2016-10-29T21:10:59Z")

</div>

That’s the most bizarre thing I’ve seen. Poking into the running project, the style is clearly set for underline and it’s assigned correctly, but the browser reports the style for the element (text-decoration) as “none”. Then when i ask the browser where it got that value, it points me back to the line where it’s being set to “underline”. hmmm…

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [October 30, 2016, 3:01pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/6 "2016-10-30T15:01:34Z")

</div>

> [@295702:@Greg O'Lone](#):
>
> That’s the most bizarre thing I’ve seen. Poking into the running project, the style is clearly set for underline and it’s assigned correctly, but the browser reports the style for the element (text-decoration) as “none”. Then when i ask the browser where it got that value, it points me back to the line where it’s being set to “underline”. hmmm…

I wonder if it’s because someone decided to `!important` everything and the browser is just as confused 😉

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [October 30, 2016, 4:47pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/7 "2016-10-30T16:47:18Z")

</div>

It may not be so much the fault of `!important` as the fact that the style is applied to the div that contains the actual HTML text within the control.

This will apply the style to the text inside the control, making underscore el al work :

[code]Sub Shown() Handles Shown  
dim js as string

js = “var Tf = document.getElementById(’”+me.controlid+"’);"  
js = js + “Tf.getElementsByTagName(‘div’)[0].className = Tf.className;”

self.ExecuteJavaScript(js)  
End Sub  
[/code]

---

<div class="post-metadata">

**Author:** ![Hal\_Gumbert](https://forum.xojo.com/user_avatar/forum.xojo.com/hal_gumbert/32/160_2.png) [@Hal\_Gumbert](https://forum.xojo.com/u/Hal_Gumbert)\
**Post date:** [January 6, 2019, 7:16pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/8 "2019-01-06T19:16:18Z")

</div>

I just was wondering if this bug that I reported a while back has been fixed, but Font Styles in WebStyles Underline, Strikethru, and Overstrike do not work in Xojo 2018r4. Bold and Italic work!

If Web 2.0 ships at or before XDC 2019, I can live with this not getting fixed.

---

<div class="post-metadata">

**Author:** ![Underwriters\_Technologies](https://forum.xojo.com/letter_avatar_proxy/v4/letter/u/ed655f/32.png) [@Underwriters\_Technologies](https://forum.xojo.com/u/Underwriters_Technologies)\
**Post date:** [January 7, 2019, 8:00pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/9 "2019-01-07T20:00:21Z")

</div>

This has been an issue for a very long time. It was a problem in the very first webedition release. Originally reported by Geoff Perlman on Mar 31, 2011 at 1:49 PM

Im not surprised Greg has not seen it as it predates his employment with Real/Xojo.

To beat a dead horse again: It would be nice of Xojo actually used webEdditon themselves. Things like this would be apparent.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:32pm UTC](https://forum.xojo.com/t/45691-weblabel-with-font-styles-underline-does-not-show-underline-in-browser/34229/10 "2020-10-29T18:32:07Z")

</div>


