Quote:
Originally Posted by Jellby
I have a non-white background on purpose (easier on the eyes, helps spotting things that have a background and shouldn't  ). And yes, I know the heading placement can be fixed, I just wanted to show that it can go wrong easily.
As long as we are relying on white background, wouldn't something like this work?
Code:
h2 {
border-bottom: 3px solid;
margin-top: -0.5em;
margin-bottom: 0.5em;
font-size: 1.4em;
text-align: center;
}
.text {
position: relative;
top: 0.7em;
padding: 0 0.2em;
background: white !important;
}
|
It could work in web browser but the "position: relative" could have problems in some ereader devices (ie. Kindle suports very bad "position: relative/absolute"). In "normal" mode and "night" mode, "background: white" it shouldn't be a problem; now, in "sepia" mode or with a custom background (very possible in android), then the "text" class, with a white background, will be noticeable