Update styling

This commit is contained in:
Joop Schilder 2021-05-10 23:32:04 +02:00
parent 362bc58c1f
commit 9c46725c8c

View File

@ -31,9 +31,6 @@ if ($form_submitted) {
.narrow { .narrow {
width: 80%; width: 80%;
} }
.off-the-wall {
margin-left: 3em;
}
.with-breating-room { .with-breating-room {
margin: 1.5em 1em; margin: 1.5em 1em;
} }
@ -126,30 +123,32 @@ if ($form_submitted) {
</form> </form>
</div> </div>
<?php if ($form_submitted): ?> <?php if ($form_submitted): ?>
<table class="bordered narrow off-the-wall"> <div class="with-breathing-room height-padded width-padded">
<tr><th class="width-padded height-padded bordered" colspan="100%"> <table class="bordered narrow">
Component table for <?php printf("%.3g Ω ", $tweeter_impedance) ?> tweeter <tr><th class="width-padded height-padded bordered" colspan="100%">
and <?php printf("%.3g Ω", $woofer_impedance) ?> woofer Component table for <?php printf("%.3g Ω ", $tweeter_impedance) ?> tweeter
</th></tr> and <?php printf("%.3g Ω", $woofer_impedance) ?> woofer
<tr> </th></tr>
<th class="width-padded height-padded bordered">Crossover Frequency (Hz)</th>
<th class="width-padded height-padded bordered">Tweeter Capacitor (μF)</th>
<th class="width-padded height-padded bordered">Woofer Inductor (mH)</th>
</tr>
<?php for ($f = FREQ_MIN; $f <= FREQ_MAX; $f += FREQ_MIN): ?>
<tr> <tr>
<td class="width-padded height-padded bordered monospace"> <th class="width-padded height-padded bordered">Crossover Frequency (Hz)</th>
<?php printf("%g", $f); ?> <th class="width-padded height-padded bordered">Tweeter Capacitor (μF)</th>
</td> <th class="width-padded height-padded bordered">Woofer Inductor (mH)</th>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000_000. * (1. / (TWO_PI * $f * $tweeter_impedance))); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000. * ($woofer_impedance / (TWO_PI * $f))); ?>
</td>
</tr> </tr>
<?php endfor ?> <?php for ($f = FREQ_MIN; $f <= FREQ_MAX; $f += FREQ_MIN): ?>
</table> <tr>
<td class="width-padded height-padded bordered monospace">
<?php printf("%g", $f); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000_000. * (1. / (TWO_PI * $f * $tweeter_impedance))); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000. * ($woofer_impedance / (TWO_PI * $f))); ?>
</td>
</tr>
<?php endfor ?>
</table>
</div>
<?php endif ?> <?php endif ?>
</body> </body>
</html> </html>