I am creating a local chat that would echo message in strings. But what I want to put background color on the strings like fb messenger. But my problem is that when i type background: red;
it will have red background. but when i put background:#0612e;
it does not effect. How to solve this problem?
echo '<div style="border: 1px solid; background:#0612e; border-radius:4px; height: auto; padding-right:8px; text-align:right; font-size:0.9em;">' . '<div style="color:#01541d;">' . $messages->username . "</div> message: " . $messages->msg . '</div>' . "<br/>";
}
When you see something like #0C0C0C, you see a hexadecimal representation of RGB integers. Each color value is made up of two characters, totaling between 0 and 255. So for example, #00FF00 is 0 red, 255 green, and 0 blue. The particular problem with the hex code in your question is that it is only 5 characters long, and needs another character.
style="background-color: #0612ee;"
You are missing background-color
and hex / # is 6 digits.