0
Why progress bar is not aligning to center???
26 ответов
+ 3
If you want to install the <progress> tag in any place without using additional containers, then this can be done for example like this:
progress {
position: absolute;
left: calc(50% - 75px);
}
75px - is half the length of the standard <progress> tag.
+ 4
Unfortunately no, I'm self-taught ☺️
+ 4
U shoud write
style="text-align:center;".It will definitely work
+ 2
Because the <p> tag has its own default style, and before you change anything, you need to reset it.
Therefore, it is necessary to use the <div> tag for such purposes.
There is also a great <center> tag.
+ 2
Your code
+ 2
<center>
<h1>Simple Progress Bar</h1>
<progress></progress>
</center>
https://code.sololearn.com/WSWh3e0bPJ5Y/?ref=app
+ 1
You need not add, but replace the <p> tag with the <div> tag.
+ 1
You should clearly understand for yourself that all tags that somehow change the text or display any images are already styled by default programmers and if you want to change them, then you need to reset them first.
And the tags: <div>, <article>, <section> are "clean" (without styling) and you can do all the curtains with them at once.
P. S: "<progress> tag, does not have the attribute "align" ".
+ 1
In general, it’s best to immediately accustom yourself to the recommended page layout structure.
Here is an example of my CSS comment code that interests you:
https://code.sololearn.com/WuURFRZPW39x/?ref=app
+ 1
<div style="align:center;"> if your using inline style your attribute should be within that.
And keep in mind an inline style has the highest priority, and will override external and internal styles and browser defaults.
+ 1
Use div
Or center tag before it
+ 1
Why we use Doc HTML in first line?
+ 1
Raeef Alkhadour Thats the standard way your mentioning your browser its an HTML5
0
But i already given the property of p tag, then why needs to add div tag, if I want to add it without new section. ??
0
Ok checking
0
Thats worked!
0
But what if I don't want to start new section with creating div tag???
Then how can align progress bar???
Also align attribute why not work in progress element???
0
Ok
0
Well thanks for valuable reply