Issue
I want to center the h3 tag which reads "my favourite song ↓" to be right above the audio player and centered, not fully to the left and not right above the audio player. I know I can remove the br line to get it closer together, but I don't want to simply use padding, I want to be sure it's centered correctly.
<hr>
<h3>my <u><i>favourite</i></u> song ↓</h3>
<br>
<audio controls>
<source src="audio/xyz.mp3" type="audio/mpeg">
</audio>
<hr>
Solution
I add code below.
<div
style="
display: flex;
flex-direction: column;
align-items: center;
width: 300px;
"
>
<h3>
my <u><i>favourite</i></u> song ↓
</h3>
<audio controls>
<source src="audio/xyz.mp3" type="audio/mpeg" />
</audio>
</div>
Answered By - Adrid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.