Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to continue any tag inline after <h5> tag

First See the image given below.

enter image description here

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.

like image 764
marry Avatar asked Oct 12 '12 09:10

marry


People also ask

How do you apply inline style?

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.

How do you write on the same line in HTML?

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.

How do you put a heading and paragraph on the same line in HTML?

Just make your <h1> display:inline. This way, it will render in the normal text flow.

What is inline HTML code?

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.


1 Answers

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.

like image 93
V.J. Avatar answered Oct 01 '22 06:10

V.J.