左から右にブロックの行が必要で、その下にブロックが続きます。
これは、ブラウザでレンダリングされた画像です。
テーブルではなくCSSですべてのポジショニングを行う必要があります。これが私のHTMLとCSSです...
<!DOCTYPE html>
<html>
<head><link rel="stylesheet" href="demo.css" /><head>
<body>
<form action="">
<fieldset>
<legend>Field set A</legend>
<label for="password">Password
<input id="password" name="password" type="text" value="my password" />
</label>
</fieldset>
<fieldset class="radio">
<legend>Chaining mode</legend>
<label for="chain-cfb">
<input id="chain-cfb" name="chain" type="radio" />CFB
</label>
<label for="chain-cbc">
<input id="chain-cbc" name="chain" type="radio" />CBC
</label>
</fieldset>
</form>
<hr />
<p style="padding-top: 1em;">Some text underneath</p>
</body>
</html>
... そして、これが demo.css の内容です...
fieldset
{
float: left;
display: block;
width: 17em;
margin: 0 1em 1em 0;
padding: 0 1em 1em 1em;
}
fieldset.radio input
{
clear: both;
float: left;
width: auto;
}
input
{
display: block;
width: 15em;
}
label
{
display: block;
margin-bottom: 1em;
font-weight: bold;
}
label.first
{
padding-top: 1em;
}
私が読んだ方法では、このコードで目的の結果が得られるはずです。しかし、私はそうではありません。これが代わりにレンダリングされるものです....
記載されている目的の結果を得るために、html/css にどのような変更を加える必要がありますか?