/    Sign up×
Community /Pin to ProfileBookmark

Watermark overflow hidden

I have a “main” content area of my website, I’m trying to place a watermark inside it using the before pseudo element and using my website name. I also want it to be hidden when I don’t have much content on the page.

Currently when I have no text inside my before element and no content on my page my website uses the full screen height as deigned. When I add website name it shows below my footer and my footer is where it should be. It’s almost like the overflow hidden isn’t working.

Any ideas?

“`

.container{
display: grid;
grid-template-rows: 18px 80px 40vh auto 200px;
grid-template-columns: auto;
grid-template-areas: “info”
“header”
“banner”
“maincontent”
“footer”;
margin: 0;
padding: 0;
}

.content{
grid-area: maincontent;
min-height: 300px;
}

.content::before{
content: ‘Website Name’;
position: absolute;
color: rgba(0,0,0,0.04);
font-size: 25em;
font-weight: 900;
z-index: -1;
overflow: hidden;
}

“`

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@cootheadJul 14.2020 — Hi there kiwis80,

a comment on this post...

[url=https://www.webdeveloper.com/d/390531-shop-locations/3][b]

[color=#069][u]Shop locations[/u][/color][/b]
[/url]


...might be a little more appropriate before

you embark upon another project.

_coothead_
Copy linkTweet thisAlerts:
@kiwisauthorJul 14.2020 — @coothead#1620513

Completely different projects. But thanks for your opinion.
Copy linkTweet thisAlerts:
@SempervivumJul 14.2020 — @kiwis80#1620512 It would be helpful it you shared the URL of your site.
Copy linkTweet thisAlerts:
@kiwisauthorJul 14.2020 — This was is sorted, was a very simple solution.
×

Success!

Help @kiwis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...