Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Watermark for All Pages

Started by Muut Archive 11 years ago · 8 replies · 474 views
11 years ago

First of all great package, fast, compatible with all modern browsers and devices! I am putting together a multiple page static site with the Antimatter theme which pretty much takes care of all of our needs. I would like to use a png file as a centered transparent fixed background for all site pages. After quiet a bit of research I have not discovered a readily available method by which to do the same. Any insight would be appreciated!

11 years ago

One would think so but that is not the case! I have already tried the same via a custom.css with increased priority to no avail!

11 years ago

I do apologize, I had not tested this on Antimatter. As it turns out, the Antimatter theme uses a section-element with the id of "body", so rather than targeting bodyyou should do:

CSS
section#body {background-image: url(http://placehold.it/500x500);}

And adjust accordingly.

11 years ago

I do appreciate the quick response and I have adjusted my image link accordingly and still am not successful. Do you have any more recommendations?

CSS

section#body {background-image:url(../images/bg.png/500x500);}
---
11 years ago

Hmm, I am not sure what is failing, apart from the obvious error in your link: /bg.png/500x500should presumably be /bg/500x500.png. On a fresh installation of Grav 1.0.0-rc6, adding a custom.css file within antimatter/csswith:

CSS
`section#body {background-image: url(http://placehold.it/500x500);}`

produces the expected result on my end.

11 years ago

And so it does, obviously I cannot read! I would assume that I can apply the usual image attributes to my image within the custom.css file?

11 years ago

Yes, as long as they target that background-image (see the previously linked to CSS-Tricks article for a host of options and related material).

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago