Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

CSS stylesheet question

  • 14-11-2005 11:20am
    #1
    Registered Users, Registered Users 2 Posts: 7,989 ✭✭✭


    Hi am creating a html page and wondering home to split a div into the left side text and the right hand side a text box.

    <div>
    Claim Number <input type="text" id=text1 name=text1>
    </div>

    I want to have the Claim Number on the left and text box on the right.

    The reason is because i will have few of these going down the page and makes it look much nicer.

    Cheers.

    WIll try and answer any queries which people may have


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Splitting it into three divs I reckon is the easiest. You have one overall container div, then two separate divs embedded into it.

    So for example

    [html]
    <div class="container">
    <div class="leftSide">
    Some Title
    </div>
    <div class="rightSide">
    Some textbox
    </div>
    </div>[/html]
    This is a basic setup. For finer control, you could use four classes = a top container, a subcontainer and then leftSide and rightSide classes, representing a table, row and two cells, respectively;
    [html]
    <div class="container">
    <div class="subContainer">
    <div class="leftSide">
    Some Title
    </div>
    <div class="rightSide">
    Some textbox
    </div>
    </div>
    <div class="subContainer">
    <div class="leftSide">
    next Title
    </div>
    <div class="rightSide">
    Next textbox
    </div>
    </div>
    </div>[/html]


  • Registered Users, Registered Users 2 Posts: 7,989 ✭✭✭Trampas


    I was hoping i wouldn't have to spilt it down into more divs but thats grand.

    Already have the page spilt a couple of times and another spilt is going to do no harm.

    Thanks for your help


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    That's just generally the way I look at it. I'm sure it's probably possible without using more divs, but doing it that way IMO would keep the code neat and controllable.


  • Registered Users, Registered Users 2 Posts: 1,268 ✭✭✭hostyle


    If you're using form elements you should really make the whole thing more accessible and use form, fieldset and label tags which should give you more hooks to style on, and reduce the extraneous div bloat. Its not always possible but you should give it a go.


Advertisement