First See the image given below.
code here:
<h5>
Login!</h5>
<table>
<tr>
<td>
User Name:
</td>
<td>
<asp:TextBox ID="_userName" runat="server"></asp:TextBox>
</td>
<td>
Password:
</td>
<td>
<asp:TextBox ID="_password" TextMode="Password" runat="server"></asp:TextBox>
</td>
<td>
<asp:Button ID="_login" runat="server" Text="Login" OnClick="_login_Click" />
</td>
</tr>
<tr>
<td colspan="5">
<asp:Label ID="_wrongDetails" runat="server"></asp:Label>
</td>
</tr>
</table>
I want username immediately after login text. I have tried position:inline. but it's not working. or can anyone help me to get started in css stuff. Thanks in Advance.
An inline style may be used to apply a unique style for a single element. To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.
To get all elements to appear on one line the easiest way is to: Set white-space property to nowrap on a parent element; Have display: inline-block set on all child elements.
Just make your <h1> display:inline. This way, it will render in the normal text flow.
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content. Note: An inline element does not start on a new line and only takes up as much width as necessary.
You need to set display:inline style in both h5 tag and table tag also. Then it will not cause both tag to break a line and hence display it in a single line.
fix it:
<h5 style="display:inline">
Login!</h5>
<table style="display:inline">
..
..
hope this helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With