0
Simple HTML Problem
In this small example code, I wanted to create a shape and a simple line of text. The problem that I'm having is that the text is not showing up when it is below the shape. However, when it is written above the shape in the code, it works fine. Why is this? <html> <body> <svg width="1000" height="1000"> <rect width="200" height="200" x="100" y="100" fill="yellow" /> </svg> <p align="center"> Why does this not work? </p> </body> </html>
4 Respostas
+ 4
it's working the text is showing scroll down.
+ 1
Well, I just messed around with the dimensions of the shape and realized why the text was so far down. Oh, and thanks
0
End your numbers with "px" or "%", then instead of <p align="center"> try this.
<p style="text-align:center;">
If that still doesn't work put the <p> in some <div></div> tags.
Hope this helps and if you need more help or this doesn't work let me know!
0
Oh awesome! Thought about that when I saw 1000px lol. But glad you fixed it!