How to create a clickable background image in phpbb?

For support and discussion related to templates and themes in phpBB 3.3.
Post Reply
Nocol333
Registered User
Posts: 26
Joined: Mon Mar 21, 2016 5:15 am

How to create a clickable background image in phpbb?

Post by Nocol333 »

How to create a clickable background image in phpbb?
User avatar
Lumpy Burgertushie
Registered User
Posts: 68479
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to create a clickable background image in phpbb?

Post by Lumpy Burgertushie »

background for what? the main page? the header bar? forum list?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Nocol333
Registered User
Posts: 26
Joined: Mon Mar 21, 2016 5:15 am

Re: How to create a clickable background image in phpbb?

Post by Nocol333 »

html, body {
background-image:

All page phpbb body background image clickable.
User avatar
Gumboots
Registered User
Posts: 410
Joined: Fri Oct 11, 2019 1:59 am

Re: How to create a clickable background image in phpbb?

Post by Gumboots »

It's possible, but I'm not sure it's a good idea. Why do you want to do it?

Edit: The short answer is that you'd use a custom anchor placed in the markup before the forum wrapper, set to position:fixed; and 100% width and height, then use position: relative; and a suitable z-index on the forum wrapper to make it sit above the anchor.
Nocol333
Registered User
Posts: 26
Joined: Mon Mar 21, 2016 5:15 am

Re: How to create a clickable background image in phpbb?

Post by Nocol333 »

html, body {
color: #536482;
background-image: url("paper.gif");
position:fixed;
width: 100%;
height: 100%;
position: relative;
z-index: -100;
}

It does not work. Enter the address of the link. Background image clickable please. How to do it?
User avatar
Gumboots
Registered User
Posts: 410
Joined: Fri Oct 11, 2019 1:59 am

Re: How to create a clickable background image in phpbb?

Post by Gumboots »

Of course that won't work. The html and body tags are not links. You need to have a link (ie: markup like <a href= etc...) in your template, and you need to put the address on that, as well as setting that link to fixed and full width/height. As an example, something like this in the template:

Code: Select all

<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
	<a href="https://my_aardvark_likes_crayons.com/woof.php" id="crayons"></a>
And then like this in the CSS:

Code: Select all

#crayons {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

#wrap {
	position: relative;
	z-index: 1;
}
The z-index might have to be set to a greater value, but at a quick guess 1 is probably ok.
User avatar
Talk19Zehn
Registered User
Posts: 588
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: How to create a clickable background image in phpbb?

Post by Talk19Zehn »

Hello, in the year 2014 we had an example for the phpBB 3.1.x branch: Perhaps the answer in this topic will also help today (?). Please take into account that you have to adjust the codes. Another approach for this request, possibly a helpful addition:
viewtopic.php?p=13718211#p13718211

Debate that in the smallest resolutions your background image will probably not be displayed extensively and then only one link should be relevant. ;)

Best regards
User avatar
Gumboots
Registered User
Posts: 410
Joined: Fri Oct 11, 2019 1:59 am

Re: How to create a clickable background image in phpbb?

Post by Gumboots »

That seems like an excessively convoluted way of doing the job.
Post Reply

Return to “[3.3.x] Styles Support & Discussion”