Skip to main content
!German ;-)
Source Link
rolfl
  • 98.1k
  • 17
  • 220
  • 419

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • In my opinion, one should always leave a space between : and value undand property declarations. It simply improves readability.
  • Be aware when using the shorthand of a property. An example of what could happen: If you write background: red;, this doesn't only set the background-color to red. It also applys the default values for the other properties available in the shorthand syntax (background-image, background-repeat, ...)

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • In my opinion, one should always leave a space between : and value und property declarations. It simply improves readability.
  • Be aware when using the shorthand of a property. An example of what could happen: If you write background: red;, this doesn't only set the background-color to red. It also applys the default values for the other properties available in the shorthand syntax (background-image, background-repeat, ...)

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • In my opinion, one should always leave a space between : value and property declarations. It simply improves readability.
  • Be aware when using the shorthand of a property. An example of what could happen: If you write background: red;, this doesn't only set the background-color to red. It also applys the default values for the other properties available in the shorthand syntax (background-image, background-repeat, ...)
added 124 characters in body
Source Link
user35408
user35408

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • It's a good practise toIn my opinion, one should always leave a space between : and value und property declarations. It simply improves readability.
  • It's also not recommended to useBe aware when using the shorthand of a property, if you only need it for one value. An example of what could happen: If you write background: red;, you wouldthis doesn't only set the background-color to red. It also overwrite anyapplys the default values for the other properties available in the shorthand syntax (background-image declarations you made earlier and so on, background-repeat, ...)

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • It's a good practise to always leave a space between : and value und property declarations.
  • It's also not recommended to use the shorthand of a property, if you only need it for one value. If you write background: red;, you would also overwrite any background-image declarations you made earlier and so on.

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • In my opinion, one should always leave a space between : and value und property declarations. It simply improves readability.
  • Be aware when using the shorthand of a property. An example of what could happen: If you write background: red;, this doesn't only set the background-color to red. It also applys the default values for the other properties available in the shorthand syntax (background-image, background-repeat, ...)
Source Link
user35408
user35408

You're repeating a lot of CSS. Let's fix that by using your #strength ID.

<style type="text/css">
#strength {
    width: 200px;
    text-align: center;
    font-weight: bold;
}

.strength0 {
    background-color: #B20E37;
}

.strength1 {
    background-color: #D32847;
}

.strength2 {
    background-color: #ff5f5f;
}

.strength3 {
    background-color: #83D680;
}

.strength4 {
    background-color: #4dcd00;
}

.strength5 {
    background-color: #399800;
}

.errorclass {
    font-size: 10px;
    font-family: Arial;
    font-weight: bold;
    color: #4F080B;
}
</style>

Notes:

  • Please check your rule for .errorclass again. Your font-family declaration ends with a , instead of a ;.
  • It's a good practise to always leave a space between : and value und property declarations.
  • It's also not recommended to use the shorthand of a property, if you only need it for one value. If you write background: red;, you would also overwrite any background-image declarations you made earlier and so on.