I'm a beginner when it comes to HTML and CSS, so my knowledge about them is quite limited. I recently encountered an issue where my text cursor disappears when the background-color of a <div>
element is dark.
Here's an example:
<style>
.PreCode {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: initial;
color: rgb(28,26,26);
background-color: grey;
border: 1px solid black;
text-transform: capitalize;
font-weight: 100;
margin-top: 20px;
text-align: center;
padding: 10px;
}
</style>
Whenever I try to focus on the text inside a <div>
with this class, my text cursor becomes invisible.
Is there any way to fix this issue? Can the color of the text cursor be changed to red instead?
Here's the code for the <div>
:
<div class="PreCode">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla necessitatibus dolorem suscipit. Quibusdam dolorem eos sunt voluptate neque, unde expedita, error modi, assumenda quisquam repudiandae iste provident rerum vel blanditiis.
</div>