jPaulB
Coder
Hi Everybody,
I have another issue to figure out.
I have a "box" that will contain a pair of randomly generated numbers ($firstnumb) + ($secondnumb). A visitor will be asked to figure out what the answer is, and enter that in a second box.
My intention is to have the box that displays ($firstnumb) + ($secondnumb) have a variable width, plus a couple of characters to the left and right. Then centre the statement box in a column that has already been defined.
As you can see in the Example.css code, I have no idea whatsoever to manage how wide this wee box will be.
How can I manage how wide this box will be?
Example.html
Example.css
Many Thanks,
Paul
I have another issue to figure out.
I have a "box" that will contain a pair of randomly generated numbers ($firstnumb) + ($secondnumb). A visitor will be asked to figure out what the answer is, and enter that in a second box.
My intention is to have the box that displays ($firstnumb) + ($secondnumb) have a variable width, plus a couple of characters to the left and right. Then centre the statement box in a column that has already been defined.
As you can see in the Example.css code, I have no idea whatsoever to manage how wide this wee box will be.
How can I manage how wide this box will be?
Example.html
PHP:
<div class="box">
<?php
print "<SPAN style='color: #0000FF'><B>$firstnumb + $secondnumb</B></SPAN>";
?>
</div>
Example.css
CSS:
.box {
width: 40%;
height: 30px;
border-style: double;
border: 2px solid green;
border-radius: 20px;
background-color: #B3FFB2;
text-align: center;
color: #FF0000;
}
Many Thanks,
Paul