Overlapping H1 div
-
Hi there,
Let’s start with some little introduction to my case, I’m working on the website of my cousin and I got this little CSS problem:
I want an image overlap the H1 background bar
h1 { font-size: 24px; margin: 20px 10px; padding: 6px 20px; line-height: 1.2em; background: #ea1325; border-radius: 100px; position:relative; }but when I add the image url it gets cropped in the div, what is kinda logical. Now I have tried to look for answers but none of the two seemed to work, this is what I have tried so far:
– negative margin
h1 { font-size: 24px; margin: -20px; padding: 6px 20px; line-height: 1.2em; background: #ea1325; border-radius: 100px; position:relative; }– adding a class (where can I find the php to add class=”” ?)
h1 { font-size: 24px; margin: 20px 10px; padding: 6px 20px; line-height: 1.2em; background: #ea1325; border-radius: 100px; position:relative; } h1 .overlay { background-image: url('../Bodega/images/structure/Globe.png') right center no-repeat; padding: 20px; }If anyone could solve this I’d be so grateful!
site: http://smartnetworking.nl
(don’t mind the yet unfinished website, I just want to focus on this little detail first before moving to the next)theme: bodega
The topic ‘Overlapping H1 div’ is closed to new replies.