Last post Aug 01, 2016 09:42 AM by Bluenose
Jul 30, 2016 10:21 PM|Bluenose|LINK
I have a Web page here:
That blue oval looking object under the form is really a label that I will use as a blue-bordered box to contain an error message:
"Email/Password invalid. Login Denied"
So, I have been working on the top/left positioning (which I am happy about) and on absolute and relative positioning.
The problem I am having is that I cannot extend the blue box to any reasonable length to accommodate the error massage. The code for the box is this:
<asp:Label ID="LabelError" runat="server" CssClass="LogonError"></asp:Label>
and the CSS at the top of the myLogon page:
border: 1px solid #05C6FC;
What is wrong with the width property in the above code, please? Why can't I make that 'label-box' wider and centered?
Aug 01, 2016 07:27 AM|Fei Han - MSFT|LINK
If you use F12 developer tools to check the html source of label control, you will find label control is rendered as <span>, and as we all know, <span> is an inline element, we could set
display property to block to display <span> element as a block element.
For more information about html block and inline elements, you could refer to this link.
Aug 01, 2016 09:42 AM|Bluenose|LINK
Hello Fei Han
Thank you for pointing that out.
I must admit, I don't use F12 very much so thanks for the useful link!
My Web page looks a lot better now!