Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2006, 06:43 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default Positioning a Textarea label

Hi folks,

I have this css for positioning my checkbox labels to the left of my checkboxes and lining them up nice and neatly. However I can't seem to make it work for the <textarea> tag.

Here is the CSS:

            form.labelpairs
            {
            clear:both;
            float:none;
            }

            form.labelpairs label
            {
            clear:left;
            display:block;
            float:left;
            text-align:right;
            width:100px;
            }

            form.labelpairs input
            {
            clear:right;
            float:left;
            margin-left:10px;
            }


And here is the markup:

<form name = "orderform" id = "orders" class = "labelpairs">
        <label for = "whatever">Bloomer</label>
            <input type = "checkbox" name = "check1" class = "chBox">
        <br>
            <label for = "whatever2">Baguette</label>
                <input type = "checkbox" name = "check2" class = "chBox">
        <br>
                <label for = "whatever3">Bap</label>
                    <input type = "checkbox" name = "check2" class = "chBox">
        <br>
                    <label for = "whatever4">Panini</label>
                        <input type = "checkbox" name = "check2" class = "chBox">
        <br>
                        <label for = "whatever5">Fillings</label>
                            <textarea name = "text1" id = "textarea1" class = "chBox"></textarea>

    </form>

What I'd like is for the textarea to be in the same position as the checkbox, but as you probably know, it just appears below the labelk. Any suggestions much appreciated.

Thanks
Joe

__________________
\'sync\' &lt;cr&gt;
The name specified is not recognized as an internal or external command, operable program or batch file.
 
Old June 13th, 2006, 06:56 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its ok, I sorted it. I had to add another selector.

Cheers
Joe






Similar Threads
Thread Thread Starter Forum Replies Last Post
form positioning jeremy1048 Access 2 February 12th, 2008 08:52 AM
Tab function + <textarea></textarea> Adam H-W HTML Code Clinic 0 April 24th, 2007 10:36 AM
Positioning Problem harpua CSS Cascading Style Sheets 5 May 27th, 2005 08:03 AM
display vbCrLf's from textarea to textarea mat41 Classic ASP Basics 8 June 10th, 2004 12:19 AM
cursor positioning alihussein3 Javascript How-To 1 October 22nd, 2003 03:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.