CSS for multiline textbox and textfield

Posted on 2009-04-16
Last Modified: 2012-06-27
I want to have a multiline textbox on the left and a text field on the right, beside it. On the baseline.

<table><tr><td valign=bottom>
<multilinetextbox goes here>
</td><td> Text: <textbox goes here>

Can that be done with styles without using a table?
Question by:BobCSD
    LVL 4

    Accepted Solution

    You can use divs just like table cells - just float one. E.G.

    <div style="float:left;">
    multi<br />
    line<br />
    textbox<br />
    here<br />
    <div style="padding-top:57px;">
    Text at baseline

    This assumes you want the "baseline" text at the bottom of the second div. If so, just adjust the padding appropriate to the height of your multiline textbox. If not, just remove the style altogether.

    Is that what you're going for?
    LVL 1

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 for Beginning Beginners

    Are you looking for an efficient introduction to HTML5? Have you tried other HTML5 courses and found them too complex? Do you need just the basics of HTML5 to use with Wordpress or other content management system? If you said yes to any of these questions, this course is for you.

    CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
    When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now