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 Sat Dec 14 2019, 17:45

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 Sat Dec 14 2019, 20:58; edited 1 time in total
The Last Outlaw
The Last Outlaw
Forumember

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

https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by Neptune- Sat Dec 14 2019, 19:07

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

https://www.galaxie-series.net/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw Sat Dec 14 2019, 19:44

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 : 430
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by skouliki Sat Dec 14 2019, 20:39

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 : 15153
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw Sat Dec 14 2019, 20:43

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 : 430
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by skouliki Sat Dec 14 2019, 20:45

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

Female Posts : 15153
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw Sat Dec 14 2019, 20:58

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 : 430
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by Neptune- Sat Dec 14 2019, 21:29

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

https://www.galaxie-series.net/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by The Last Outlaw Sun Dec 15 2019, 00:11

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 : 430
Reputation : 11
Language : English (US)
Location : Salem, Oregon, USA

https://www.betheasbyte.com/

Back to top Go down

Solved Re: Christmas Decoration Issue

Post by SLGray Sun Dec 15 2019, 02:06

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 : 51503
Reputation : 3519
Language : English
Location : United States

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