The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Christmas Decoration Issue

4 posters

Go down

Solved Christmas Decoration Issue

Post by The Last Outlaw December 14th 2019, 4:45 pm

http://betheasbyte.forumotion.com

Hi guys.

Like the title says I have a funny, yet annoying issue.

I (purposely) have Christmas Lights and Garland at the top of my page as well as snow flurries falling.  The issue is with the Garland when I go to read or make a post.  It's like it resizes itself to cover my entire banner.  What can I do (if anything) to resolve this annoyance?


Last edited by The Last Outlaw on December 14th 2019, 7:58 pm; edited 1 time in total
The Last Outlaw
The Last Outlaw
Forumember

Male Posts : 429
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

View user profile https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by Neptune- December 14th 2019, 6:07 pm

Hello,


Just replace your garland script with that one :
Code:
    var garland = 2; var howhigh = 110;
    $(function() {
    var garlandSources = ['https://i.imgur.com/JlA9EbE.png', 'https://i.imgur.com/R3azwF4.png', 'https://i.imgur.com/CcX2vOx.png'];
    var g = (typeof garland !== 'undefined') ? garland : 0;
    var hei = (typeof howhigh !== 'undefined') ? howhigh : 110;
      var css = ".christmas_garland { width: 100%; position: absolute; z-index:1; top: 0; left: 0; background-image: url('" + garlandSources[g] + "'); background-size: auto 100%; height: " + hei + "px;";
    $('body').prepend('<div class="christmas_garland"></div>');
    $('head').append("<style>" + css + "</style>");
    });
Neptune-
Neptune-
Forumember

Female Posts : 496
Reputation : 104
Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
Location : Scotland, UK

View user profile https://www.galaxie-series.net/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw December 14th 2019, 6:44 pm

Neptune- wrote:Hello,


Just replace your garland script with that one :
Code:
    var garland = 2; var howhigh = 110;
    $(function() {
    var garlandSources = ['https://i.imgur.com/JlA9EbE.png', 'https://i.imgur.com/R3azwF4.png', 'https://i.imgur.com/CcX2vOx.png'];
    var g = (typeof garland !== 'undefined') ? garland : 0;
    var hei = (typeof howhigh !== 'undefined') ? howhigh : 110;
      var css = ".christmas_garland { width: 100%; position: absolute; z-index:1; top: 0; left: 0; background-image: url('" + garlandSources[g] + "'); background-size: auto 100%; height: " + hei + "px;";
    $('body').prepend('<div class="christmas_garland"></div>');
    $('head').append("<style>" + css + "</style>");
    });

Awesome piece of coding, @Neptune-  Thank you so much!

EDIT:
One more thing. If I want to change the garland at anytime, what do I do? Change the number?
The Last Outlaw
The Last Outlaw
Forumember

Male Posts : 429
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

View user profile https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by skouliki December 14th 2019, 7:39 pm

hello




Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
Please read our forum rules:  ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 12676
Reputation : 1544
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw December 14th 2019, 7:43 pm

skouliki wrote:hello




Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
Please read our forum rules:  ESF General Rules
Hello.

This is relevant to my previous question. This code that @Neptune gave me (and I'm very appreciative of it) I wanted to know if it's changeable.
The Last Outlaw
The Last Outlaw
Forumember

Male Posts : 429
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

View user profile https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by skouliki December 14th 2019, 7:45 pm

i know that
iam talking about the topic title
skouliki
skouliki
Manager
Manager

Female Posts : 12676
Reputation : 1544
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw December 14th 2019, 7:58 pm

skouliki wrote:i know that
iam talking about the topic title

O I C.

No Problem and DONE
The Last Outlaw
The Last Outlaw
Forumember

Male Posts : 429
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

View user profile https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by Neptune- December 14th 2019, 8:29 pm

You can change the first line of the script with 0, 1 or 2 for garland value.

You can even change garlands themselves editing line 3 (garlandSources variable) with new pictures

The Last Outlaw wrote:Awesome piece of coding, @Neptune-  Thank you so much!
I've coded nothing, just took original script and replaced variable height (already used by text editor) with variable howhigh
Neptune-
Neptune-
Forumember

Female Posts : 496
Reputation : 104
Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
Location : Scotland, UK

View user profile https://www.galaxie-series.net/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw December 14th 2019, 11:11 pm

Neptune- wrote:You can change the first line of the script with 0, 1 or 2 for garland value.

You can even change garlands themselves editing line 3 (garlandSources variable) with new pictures

The Last Outlaw wrote:Awesome piece of coding, @Neptune-  Thank you so much!
I've coded nothing, just took original script and replaced variable height (already used by text editor) with variable howhigh

Thank you so much. Now this one is SOLVED!
The Last Outlaw
The Last Outlaw
Forumember

Male Posts : 429
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

View user profile https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by SLGray December 15th 2019, 1:06 am

Topic Solved & Archived


Christmas Decoration Issue Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 50441
Reputation : 3478
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum