By timezero on
Hi, I have been trying to replace the h2 with an image using CSS but the image just won't show up. I was wondering if it might be so that drupal blocked this because of security reasons?
.block-gallery .h2.title {
background-image:url("image.gif");
}
Comments
should be: .block-gallery
should be:
you have an extra '.' before the h2 selector.
Remove the period before the
Remove the period before the h2. The period tries to treat it as a class name, but it's a tag name.
Hi, thanks for your reply! I
Hi, thanks for your reply!
I tried removing the the period but with the same result. Any other property inside the CSS tag will be formatted correctly. However the picture does no show up, I've tried linking it with both full url and relative url.
Any help would be gladly appreciated!
location
where is image.gif? The location is relative to the css file, so you will need to make sure the file is next to the css or place directory names in the css.
You will probably want it to
You will probably want it to look a bit more like this:
Thank you for the code!
Thank you for the code!
I tried it but the image still won't render. I put the image in the same folder as the css file but it does not show up. I also noticed Firebug does not show the background-image-tag at all. I am thinking maybe there is some filter preventing it from loading.
Try something like this: body
Try something like this:
Sounds like it may be a preference rule.
Web Developer
You can install the Web Developer toolbar in Firefox. Great for tracking down CSS issues. If the CSS doesn't show at all then there is probably an error with it, that would be normal behavior.
Firebug - he said he uses it
Firebug - he said he uses it already.