Reputation: 12851
I am trying to create a box like below picture.
This box will use for time and other two-digit numbers.
I putted my code here
I have some problems and questions:
Upvotes: 1
Views: 3211
Reputation: 43669
See this demo fiddle.
The markup now shows like:
<div id="digits">
<p>Days<span class="colon">: </span><span class="digits">10</span></p>
<p>Hours<span class="colon">: </span><span class="digits">00</span></p>
<p>Mins<span class="colon">: </span><span class="digits">00</span></p>
<p>Secs<span class="colon last">: </span><span class="digits">00</span></p>
</div>
You could narrow it down to this:
<div id="digits">
<p>Days<span>: </span><span>10</span></p>
<p>Hours<span>: </span><span>00</span></p>
<p>Mins<span>: </span><span>00</span></p>
<p>Secs<span class="last">: </span><span>00</span></p>
</div>
Tweak it a bit further as you like.
Upvotes: 1
Reputation: 491
use this img as background for your divs:
then place black text on it in a condensed font. add a border to the divs, like in the images and give the wrapper a matching background color.
Upvotes: 1
Reputation: 48
I would create the numbers as an image sprite with the inner shadows that could be split left and right:
00
11
22
33
44
55
66
77
88
99
Then I would build a png overlay with transparent cutouts to mask the number images.
Upvotes: 0