Fieldsets with tables inside. How to put them on the same line?
Asked Answered
S

2

9

I need to align two <fieldset> objects on the same line in partial view form. Whatever I do nothing helps. Trying to float them to the left, to the right, tried to minimize the width, tried display:inline option.

Without tables it works. With them - doesn't.

UPD: Or it might be something to do with qTip within which I'm trying to place those.

Scarito answered 20/7, 2011 at 19:34 Comment(3)
So don't use tables then. I can't see why you'd have to.Azucenaazure
Doc, everytime when I try to extend my left arm I feel cramps in my armpit. Doctor: Well, don't extend your left arm then, try to use the other oneScarito
can you provide a code sample illustrating your problem?Darned
A
11

It's not tabular data, so why are you using a table?

There are numerous css fieldset examples to use to make nice looking fieldsets using labels and inputs appropriately. (See http://www.pixy.cz/blogg/clanky/css-fieldsetandlabels.html and http://www.sitepoint.com/fancy-form-design-css-4/ for two quick examples)

If you then want to have the two fieldsets arranged horizontally, you can use display: inline-block

Adrianeadrianna answered 20/7, 2011 at 19:47 Comment(1)
It's just the qTip. By default it limits the maxWidth by 250px;Scarito
A
0

Fieldset works with the tables. Remove any style part in the table tag. try this example. It works for me.

<fieldset id="fieldset3" style="padding:20px;top:230px; position: absolute;">
<legend>Search Results</legend>
    <table id="EmployeeDetails" border="1" cellpadding="3%">
    <tr>
        <th>Name</th>
        <th>Case Status</th>
        <th>Click here to View </th>
    </tr>
    <tr>
        <td>Dinesh</td>
        <td>Occupied</td>
        <td><button type="submit" id="Search">Search</button></td>
    </tr>
</table>
</fieldset>
Avulsion answered 4/7, 2014 at 7:26 Comment(2)
Why do you have a form inside a fieldset? It should be the other way around. developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldsetCarrefour
Apologies! Typo error! Removed it now. @CarrefourAvulsion

© 2022 - 2024 — McMap. All rights reserved.