locked
Incorrect font RRS feed

  • Question

  • User-1793215261 posted

    Hello

    I have this in my Default.aspx file:

    <asp:Label ID ="LblDate" runat="server" CssClass="dateStyle" Text="Label"></asp:Label>

    and the date is visible in front of an image on my Web page. It is given the following CSS:

    body
    {
    	background:url(images/bg_blur.jpg) no-repeat center center fixed;
    	background-color:darkgrey;
    	background-size:cover;
    	font-family:Candara, 'Segoe UI', Tahoma, sans-serif;
       }
    
     .dateStyle
    {
    	color:white;
            font-size:14px;
            float:left;
    	font:normal 14px Candara, 'Segoe UI', serif;
    	left:30px;
    	;
            top:15px;
      }

    However, the font-size does not change when I alter it and its colour is more grey than white. I have stylised it correctly, haven't I?

    Thank you.

    Wednesday, June 20, 2018 2:02 PM

Answers

  • User36583972 posted


    Hi Bluenose,

    However, the font-size does not change when I alter it and its colour is more grey than white. I have stylised it correctly, haven't I?

    When you set the font CSS property, the font-size and font-family CSS property will be ignored(IE, Edge,Chrome). If you want use the font-size property, you can remove the font CSS property.


    Best Regards,

    Yong Lu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 21, 2018 7:40 AM

All replies

  • User475983607 posted

    Try pressing ctrl-F5 to force the browser to reload the CSS file rather than loading from cache.

    Color is dependant on your monitor or screen.

    Wednesday, June 20, 2018 2:15 PM
  • User-474980206 posted

    use the browser debugging tools to see the applied CSS.

    Wednesday, June 20, 2018 4:43 PM
  • User36583972 posted


    Hi Bluenose,

    However, the font-size does not change when I alter it and its colour is more grey than white. I have stylised it correctly, haven't I?

    When you set the font CSS property, the font-size and font-family CSS property will be ignored(IE, Edge,Chrome). If you want use the font-size property, you can remove the font CSS property.


    Best Regards,

    Yong Lu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 21, 2018 7:40 AM
  • User-1793215261 posted

    Hello

    Thanks Yong Lu

    I now have this:

    .dateStyle {
    
        color: #ffffff;
    
        /*font-size:12px;*/
    
        float: left;
        
        font: normal 14px Candara, 'Segoe UI', serif;
    
        left: 30px;
    
        ;
    
        top: 15px;
    
    }

    and the font size DOES change, so many thanks. For some reason, the font is still not white, although I do have a white font in other type on the same page. I have tried the suggestion above:

    'Try pressing ctrl-F5 to force the browser to reload the CSS file rather than loading from cache', but it makes no
    difference.

    I may just have to ignore that for the time being.

    Thanks again.

    Saturday, June 23, 2018 9:22 AM