0

以下のコードでは、$title1 と $title2 は div の外にあり、ページの幅に対して中央に配置する必要があります。そこに「Y」があるため、これを行うだけです。「Y」を削除すると、テキストが上に移動し、アドレス クラスの中央に配置されます。明らかに、「Y」をそのままにしておくことはできませんが、なぜそれが変化するのかはわかりません。

<html>
    <head>
        <title></title>
        <style>
            body { margin:12pt auto 12pt auto;width:568pt; }
            .sseal { float:left; width:56.25pt; }
            .address { float:left;text-align:center; margin:15px auto;width:450pt; }
            .dseal { float:right; width:56.25pt;}
            wrapper { margin:0px auto; }
            .form_title { text-align:center;font-weight:bold;font-size:22pt; }
            .header { font-weight:bold; }
            .heading { font-size:16pt;font-weight:bold; }
            .title1 { font-size:24pt;font-weight:bold;text-align:center; }
            .title2 { font-size:22pt;font-weight:bold; font-style:oblique;text-align:center; }
            table, th, td { padding:10px; }
            hr { padding:0px;spacing:0px;margin:0px; }
            .rightpaced { margin:45px; }
        </style>
    </head>
    <body>
        <div class="wrapper">   
            <div class="sseal"><img src="../image2.gif" height="75" width="75" border="0"></div>
            <div class="clear:both;"></div>
            <div class="address">
                <font size=+1><b>
                $companyname<br>
                $address
                </b></font>
            </div>
            <div class="clear:both;"></div>
            <div class="dseal"><img src="../image2.gif" height="75" width="75" border="0"></div>
            <div class="clear:both;"></div>
        </div>
        <div class="clear:both;"></div>
        Y<br>
        <div class="title1">$title1</div>
        <p>
        <div class="title2">$title2</div>


    </body>
</html>
4

1 に答える 1