I'm working on a project and aiming to achieve this design:
https://i.stack.imgur.com/YflaU.png
To test it out, I created a sample page with the following code:
p {
display: inline;
background-color: yellow;
box-shadow: 10px 0px 0px red, -10px 0px 0px red;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>Here will be a text. Here will be a text... (text content continues)
</p>
</body>
</html>
Upon testing, I noticed that the appearance varies between Chrome and Firefox. While Chrome's version looks fine to me, I'm not satisfied with how it displays in Firefox.
Chrome https://i.stack.imgur.com/IkbrP.png
Firefox https://i.stack.imgur.com/M2f4d.png
Is there a way to make the design look consistent across both browsers? I'm open to any solution that doesn't necessarily involve using the box-shadow
property.