trying to use block and inline on select tags inside a form
Posted: Wed Jan 28, 2009 9:23 am
Hi
I am building a form that has four select dropdowns. The first 2 are shorter (this works) and should sit next to other horizontally, and the other two on new rows. I seem to be able to do one or the other and not both. Heres the code i have
I have tried to make an additional inline style and add that to the class I already have but can't seem to get it to work.
I am building a form that has four select dropdowns. The first 2 are shorter (this works) and should sit next to other horizontally, and the other two on new rows. I seem to be able to do one or the other and not both. Heres the code i have
Code: Select all
<?php
?>
<style>
.search fieldset {
clear: both;
}
.search fieldset label{
color: #000;
font-size: 1em;
font-weight:bold;
margin-bottom: .2em;
}
.search fieldset h4 {
margin-left: 0;
}
.search fieldset select {
display: block;
}
.search fieldset select .row {
width: 10.25em;
display: block;
}
/* */
}
</style>
<div class="search">
<fieldset>
<h4>Search</h4>
<label for="firstField" >1st Field</label>
<select id="firstField" class="row">
<option>Price (form)</option>
</select>
<select class="row">
<option>Price (to)</option>
</select>
<label for="secondField">Second Field</label>
<select class="normal">
<option>options</option>
</select>
<select class="normal">
<option>more options</option>
</select>
<div class="submit">
<a href="#">Submit</a>
</div>
</fieldset>
</div>
Code: Select all
<style>
.searchTargetPrice fieldset select .row .inline {
display: inline;
}
</style>
<select class="row inline">
Any help would be gratefully recieved.