+ 6
Need some help please!
How do you place a digit '1' in the middle of a square? I can only center it at the top or along the bottom but I want it in the middle. Please share code.
7 Antworten
+ 2
Thanks Roel. But it is a little more complicated. I am dealing with a 3D cube animation. Need to adjust the digits on all sides under <p>.
+ 2
Thanks Roel. I think that "center of square" code should work. Let me try it out. If I don't come right I will give you an example of the code to clarify. Really appreciate the willingness to help.
+ 2
<div id="cube">
<div class="side1"><p>1</p></div>
<div class="side2"><p>2</p></div>
<div class="side3"><p>3</p></div>
<div class="side4"><p>4</p></div>
<div class="side5"><p>5</p></div>
<div class="side6"><p>6</p></div>
</div>
Not working. I got the digits in this code. But I just can't seem to get them to sit in the middle.
+ 2
.side1 {
line-height: 20px;
height: 200px;
border: 1px solid black;
text-align: center;
}
I got it thanks. I used the above code in case somebody else might need it 👍
+ 1
you can do it like this
square
<br>
<p>text</p>
end of square and you can make the square so it exactly fits in the center
+ 1
https://code.sololearn.com/WTudOfSm8f7S/?ref=app
something like this
+ 1
can you show me a code or something what you already have?