Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-07-02 13:51:55

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Background texture on web pages

I have followed the advice in the topic http://community.theturninggate.net/vie … hp?id=6622 successfully so I know that my custon.css setup is working. What I had under CE4 and want in Backlight is the ability to add a texture to all of my web pages. This is the custom.css code I was uisng in CE4 and copied over to Backlight with a path modification which I hope is correct:

/* If your page background-color is red after enabling the PHPlugins function, then you know it's working.
* Delete this after confirmation, because it's hideous :
*/
body {
    background-attachment: scroll;
    background-image: url(/backlight/custom/phplugins/images/background.jpg);
    background-position: center top;
    background-repeat: repeat;

/*    background-color: #f00 !important;  */
    }

Is this code correct and should it not override any colour setup in the Backlight template definition?

Offline

#2 2016-07-02 14:32:38

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

Did you try
html, body, main
As the selector?

If that's not it, be sure to post a link


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2016-07-02 21:12:39

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

I'm not sure what you mean by "the selector". And the link is www.charking.com.

I just started working on this yesterday evening and it is still very much a work in progress. No galleries as yet. I'm trying to set up the site's "shell" before adding galleries.

Last edited by charking (2016-07-02 21:13:07)

Offline

#4 2016-07-02 23:54:21

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

I'm not sure what you mean by "the selector".

Instead of starting the css rule with:

body {

start it with this:

html, body, main { 

html, body, main are the selectors that tell the browser which elements to apply the css to.

another problem is that the page can't access your background image, I get a 403 Forbidden error when trying to reach background.jpg

http://www.charking.com/backlight/custo … ground.jpg

You could try changing permissions on the folder containing your image.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2016-07-03 00:31:55

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

The permission code on all folders down to the background image is 755. I can't see any problem here.

Added after further testing:
I can call up the custom.css code in a browser with http://charking.com/backlight/custom/css/custom.css, but it fails with the phplugins folder.

Last edited by charking (2016-07-03 00:41:36)

Offline

#6 2016-07-03 00:38:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

Well, the picture can't be reached. Not sure why. I'd try moving the images/ folder to the root of the site and changing the url to the image in your custom css.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2016-07-03 01:21:55

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Hi, Rod.

I've followed through on your suggestion, but it still doesn't want to work. Would you please take another look.

The image is now at http://www.charking.com/phplugins/images/background.jpg and is accessible and the custom.css file reads

html, body, main {
    background-attachment: scroll;
    background-image: url(/phplugins/images/background.jpg);
    background-position: center top;
    background-repeat: repeat;
    }

Offline

#8 2016-07-03 01:24:37

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

Seems to be working fine. I can see the background texture on your home page.
http://www.charking.com/


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2016-07-03 01:39:45

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

I can't see it at all. The look that I am after is what I had under CE4. An example can be seen in my original opening screen at www.charking.com/opening. The texture is showing only in the slideshow and not in the overall background because the other CE4 modules are not available. Under Backlight my masthead and menu links have a black background and I don't see the texture at all, possibly because it is too light.

Offline

#10 2016-07-03 01:45:56

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Also, if I type in www.charking.com, the masthead and menu items are off-centre; whereas if I type in charking.com, I get them centered  the way I want them.

This may be a browser problem. It happens to me in Opera but not Chrome or IE.

Last edited by charking (2016-07-03 01:49:40)

Offline

#11 2016-07-03 01:48:08

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

Also, if I type in www.charking.com, the masthead and menu items are off-centre; whereas if I type in charking.com, I get them centered  the way I want them.

I see no difference between charking.com and www.charking.com


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#12 2016-07-03 01:53:49

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

I can't see it at all. The look that I am after is what I had under CE4.

Then you'll need to find the right css selector to apply the background texture where you wish it to go. Use your browser's inspector to find that:
http://ttg-tips-and-tricks.barbeephoto. … selectors/

Looks like it could be .page__main and .page__column. But those might not be specific enough.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#13 2016-07-03 01:55:47

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Hi, Rod. You keep beating me when I add additional comments. smile The difference between with and without www. is definitely a browser problem. It happens only in Opera which I use most of the time.

Offline

#14 2016-07-03 01:59:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

charking wrote:

Hi, Rod. You keep beating me when I add additional comments. smile The difference between with and without www. is definitely a browser problem. It happens only in Opera which I use most of the time.

They both look the same to me in Opera as well.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#15 2016-07-03 02:01:11

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Thanks for your further suggestion on finding the right css selector. I'll follow through on that. I'm finding that Backlight is making some things very much easier and a few things a bit harder. smile

Offline

#16 2016-07-03 02:40:07

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

rod barbee wrote:
charking wrote:

Hi, Rod. You keep beating me when I add additional comments. smile The difference between with and without www. is definitely a browser problem. It happens only in Opera which I use most of the time.

They both look the same to me in Opera as well.

That's interesting. It's the initial appearance of the home page which differs when I enter the web site in Opera. After that they appear exactly the same, even when I return to the home page. Could be my implementation of the software.  I don't intend to lose any sleep over it. smile

Offline

#17 2016-07-03 06:43:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

Or it could be a quirk of the browser.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#18 2016-07-09 04:40:13

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

My web site is up and running the way I want it, opening video and all. I can now get back to my photography and create more galleries. The only remaining item is my background texture. If my review of HTML and CSS as well as the Backlight framework is correct, all of the section ids are in XML files so that selectors such as "html, body, main" do not work. What does work is the following code:

* {
    background-attachment: scroll;
    background-image: url(../images/background.jpg);
    background-position: center top;
    background-repeat: repeat;
    }

However, this puts my background texture everywhere, and I do mean everywhere. The one issue I have with this is that it puts the texture into the space in the thumbnail frames. These I want to be white. Any suggestions?

Pleas take a look at www.charking.com.

Last edited by charking (2016-07-09 04:43:15)

Offline

#19 2016-07-09 05:20:08

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

using * is the universal selector. As you've discovered, you don't what to use that.

all of the section ids are in XML files

No, just css files.

Where exactly do you want the background texture?

if you use this:

 html, body, main {
    
    background-attachment: scroll;
    background-image: url(../images/background.jpg);
    background-position: center top;
    background-repeat: repeat;
}

And then set other sections to be transparent, you'll get the texture for the whole page background. Right now your header background is white, the content background area is white, your footer background area is white, etc.

But I may have found a bug. In the page template > Main Column > Background-color, I tried setting mine to transparent. The color code shows: rgba(0, 0, 0, 0) which should be transparent. But in the inspector it's showing #ffffff. But I'm not positive if this page section is set up to take alpha channels.
This is happening in other areas too, like Navigation-Header.

With custom css I can add this:

.page__main {
    background-color: transparent;
}

and the copy area goes transparent.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#20 2016-07-09 05:47:09

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

It's looking to me that Main Column, Navigation-Header, and Tray Columns cannot currently be set to transparent in the Backlight interface but instead need custom css to do it.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#21 2016-07-09 06:34:23

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Thanks, Rod. As soon as you mentioned "transparent" I knew that was the answer to my problems. However, you are right; I am having a problem with the navigation header and maybe the footer (its pattern lacks consistency with the other elements). I added the .page_main code; what should the selector be for the navigation header and the footer?

By the way, this is a good example of the need for a global setting in Backlight; I must have made over 20 settings of background color to transparent.

Offline

#22 2016-07-09 07:11:51

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Actually the masthead doesn't always seem to come out how I want it.

Actually, I should probably take this back. One thing though, I have lost the background texture in Photoswipe, given the * selector, which I thought was nice to have.

Last edited by charking (2016-07-09 07:28:00)

Offline

#23 2016-07-09 07:38:45

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

This looks like it should cover everything other than the masthead and footer. Those can be set to transparent in the Backlight interface. (I doubt this will put your texture behind large Photoswipe images. You'll probably have to do that seperately)

main, .page__main, nav, #primary-menu li, .page__column.page__tray, ul#primary-menu {
    background-color: transparent;
}

I didnt' have the time to really dig into this, so there may be simpler selectors to use.

I think the selector for footer is just "footer". It's an element rather than a class or ID.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#24 2016-07-09 08:00:21

charking
Member
From: Montreal, Quebec, Canada
Registered: 2013-04-03
Posts: 142
Website

Re: Background texture on web pages

Thanks, Rod. You've been a great help. I'll try this tomorrow morning (my time).

Offline

#25 2016-07-09 22:25:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Background texture on web pages

I discussed this with Matt. There are very good reasons why transparency can't be set in the Backlight interface for the main content area, column trays, and navigation: Madness ensues upon the site going responsive for mobile devices.
So if you use the above CSS, place it in a media query that applies it only to desktop sizes.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

Board footer

Powered by FluxBB