I have a simple h1 tag. What I would like is to have a border on the left side and a different color on the other side of the line, like in this example
I have tried it with pseudo before but I can’t get it to work: This is what I have sofar:
@ Paul and Dresden. All three methods are working great. thanks a lot
I have adjusted the css a bit because with the above methods the h1 tag was actually indenting within the parent, where I actually wanted the grey bean to start at the edge of the viewport So I adjusted like this:
Our examples above would be at the edge of the viewport if you reduced margins on the body,
It’s hard to see what effect you want as the last example doesn’t relate to your original drawing any more. You just seem to have 2 x 1px borders now at the left?
In your example should text wrap it will disappear.
We would need to know the dynamics a little more. If you want never ending lines then the techniques in this example would suffice.
If the text “Over Ons” gets changed to something with more words then there would be an issue if the words wrap to the next line as they will disappear. Or if the site is responsive then they probably will wrap at some stage if there are more than 2 words.
I’d probably do it like this so that text can wrap: