0

Why progress bar is not aligning to center???

https://code.sololearn.com/WHhqmmygUbf8/?ref=app

7th Apr 2020, 12:25 PM
Himanshu Rai
Himanshu Rai - avatar
27 Réponses
+ 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.
7th Apr 2020, 3:07 PM
Solo
Solo - avatar
+ 4
Unfortunately no, I'm self-taught ☺️
7th Apr 2020, 2:43 PM
Solo
Solo - avatar
+ 4
U shoud write style="text-align:center;".It will definitely work
8th Apr 2020, 5:41 AM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
8th Apr 2020, 5:48 AM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
+ 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.
7th Apr 2020, 12:46 PM
Solo
Solo - avatar
+ 2
Your code
8th Apr 2020, 5:49 AM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
+ 2
<center> <h1>Simple Progress Bar</h1> <progress></progress> </center> https://code.sololearn.com/WSWh3e0bPJ5Y/?ref=app
9th Apr 2020, 12:01 PM
Solo
Solo - avatar
+ 1
You need not add, but replace the <p> tag with the <div> tag.
7th Apr 2020, 1:33 PM
Solo
Solo - avatar
+ 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" ".
7th Apr 2020, 1:58 PM
Solo
Solo - avatar
+ 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
7th Apr 2020, 2:07 PM
Solo
Solo - avatar
+ 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.
7th Apr 2020, 10:29 PM
Naveenkumar A
Naveenkumar A - avatar
+ 1
Use div Or center tag before it
8th Apr 2020, 12:29 PM
Raeef Alkhadour
Raeef Alkhadour - avatar
+ 1
Why we use Doc HTML in first line?
8th Apr 2020, 3:03 PM
Sarmad Ali
Sarmad Ali - avatar
+ 1
Raeef Alkhadour Thats the standard way your mentioning your browser its an HTML5
8th Apr 2020, 5:58 PM
Naveenkumar A
Naveenkumar A - avatar
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. ??
7th Apr 2020, 1:27 PM
Himanshu Rai
Himanshu Rai - avatar
0
Ok checking
7th Apr 2020, 1:37 PM
Himanshu Rai
Himanshu Rai - avatar
0
Thats worked!
7th Apr 2020, 1:38 PM
Himanshu Rai
Himanshu Rai - avatar
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???
7th Apr 2020, 1:39 PM
Himanshu Rai
Himanshu Rai - avatar
0
Ok
7th Apr 2020, 2:37 PM
Himanshu Rai
Himanshu Rai - avatar
0
Well thanks for valuable reply
7th Apr 2020, 2:39 PM
Himanshu Rai
Himanshu Rai - avatar