PHP gevorderde |
|
ik heb het volgende voor en fieldset:
fieldset {
border: 1px solid #6C757A;
background-color: #F0F0F0;
position: relative;
margin: 10px 3px 10px 3px;
padding: 10px 10px 10px 10px;
margin-bottom: 10px;
}
fieldset.inline {
border: 1px solid #6C757A;
background-color: #E0E0E0;
position: relative;
margin: 10px;
padding: 10px 10px 10px 10px;
}
legend {
font-size: 12px;
font-weight: bold;
color: #6C757A;
position: absolute;
top: -.5em;
left: .5em;
margin: 0px 0px 0px 2px;
padding: 0px 10px 0px 10px;
z-index: -1;
}
fieldset div.formcontainer {
margin-top: 0px;
margin-bottom: 4px;
margin-left: 4px;
margin-right: 4px;
background-color: #FFFFFF;
}
fieldset { border: 1px solid #6C757A; background-color: #F0F0F0; position: relative; margin: 10px 3px 10px 3px; padding: 10px 10px 10px 10px; margin-bottom: 10px; } fieldset.inline { border: 1px solid #6C757A; background-color: #E0E0E0; position: relative; margin: 10px; padding: 10px 10px 10px 10px; } legend { font-size: 12px; font-weight: bold; color: #6C757A; position: absolute; top: -.5em; left: .5em; margin: 0px 0px 0px 2px; padding: 0px 10px 0px 10px; z-index: -1; } fieldset div.formcontainer { margin-top: 0px; margin-bottom: 4px; margin-left: 4px; margin-right: 4px; background-color: #FFFFFF; }
de fieldset zelf ziet er zo uit:
<form name="{$objectname.singular|lower}" title="{$recordname.singular} formulier" action="/{$requestparams.module}/{$requestparams.controller}/{$action}/" method="{$form.meta.method}" accept-charset="{$form.meta.charset}">
<table cellpadding="0" cellspacing="0" width="900px">
<tr>
<td width="50%" valign="top">
{* <!-- ALGEMEEN -->*}
<fieldset>
<legend>Fiche Toevoegen</legend>
{*<!-- FORM ERRORS -->*}
{if $form.errors}
<div align="center">
{include file=$script_paths.global|cat:"/form/errors.tpl" form_errors=$form.errors}
</div>
{/if}
{*<!-- ACTION RESULT -->*}
{if $act_result}
{include file=$script_paths.global|cat:"inc/actionresult.tpl" timeout=0 act_result=$act_result}
{/if}
<div class="formcontainer">
<!-- de rest van je form -->
</div>
</fieldset>
</td>
</td>
</tr>
</table>
</form>
<form name="{$objectname.singular|lower}" title="{$recordname.singular} formulier" action="/{$requestparams.module}/{$requestparams.controller}/{$action}/" method="{$form.meta.method}" accept-charset="{$form.meta.charset}">
<table cellpadding="0" cellspacing="0" width="900px">
<tr>
<td width="50%" valign="top">
{* <!-- ALGEMEEN -->*}
<fieldset>
<legend>Fiche Toevoegen</legend>
{*<!-- FORM ERRORS -->*}
{if $form.errors}
<div align="center">
{include file=$script_paths.global|cat:"/form/errors.tpl" form_errors=$form.errors}
</div>
{/if}
{*<!-- ACTION RESULT -->*}
{if $act_result}
{include file=$script_paths.global|cat:"inc/actionresult.tpl" timeout=0 act_result=$act_result}
{/if}
<div class="formcontainer">
<!-- de rest van je form -->
</div>
</fieldset>
</td>
</td>
</tr>
</table>
</form>
op deze manier kan je perfect spelen met de margins en paddings om een fieldset er identiek in FF, IE 6 en 7 te laten uitzien, Safari reageert hier ook goed op.
Grtz.
|