Jump to content
anet

gradient fill for background?

Recommended Posts

anet    0
anet

Hi, I am pretty new to wp and pagelines and css.

But I found a site to create the css for the gradient I want for the background to my site. Here's how I added it to Custom Css in Pagelines Lite.

 

But nothing shows up. So other than the actual gradient code, there must be something obvious Css-related I'm not doing. Anyone able to help? Thanks in advance. 

 

 

 

 
//** This gradient background code was created using this website: www.colorzilla/gradient-editor/ **//
 
.gradient-bg {
  
background: #bcd9f6; 
  
  /* Old browsers */
background: -moz-linear-gradient(left, #bcd9f6 0%, #0d3d57 89%, #0a2b3f 100%); 
  
  /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#bcd9f6), color-stop(89%,#0d3d57), color-stop(100%,#0a2b3f)); 
  
  /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* Opera 11.10+ */
background: -ms-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* IE10+ */
background: linear-gradient(to right, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bcd9f6', endColorstr='#0a2b3f',GradientType=1 ); 
  
  /* IE6-9 */
 
}
  

Share this post


Link to post
Share on other sites
batman    389
batman

Hi anet

 

Can you provide a link to your website please.

 

First you change 

.gradient-bg 

for

.canvas #page-canvas

 

And you see what's happen

;)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
anet    0
anet

Hi, batman, here it is: http://www.lacctemp.lightoflearning.org/

I made the change you suggested. Gradient doesn't show up as background. I even removed the solid blue that is there (in Color Controls/Body Background), but still the Custom Css for gradient did not work. So I put the solid blue back in for now.

Edited by anet (see edit history)

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

Basically, the code you have above is for gradients. However, the code is not targeting anything like Batman suggested. You will need to use the like this:

 

#site .page-canvas {}

 

And then add your gradient code inside the {  }

For example,

 

#site .page-canvas {
background: -webkit-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
}

 

I recommend you give our custom CSS documentation a read, as it will certainly assist you.

 

http://support.pagelines.me/docs/customization/custom-css/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
anet    0
anet

Ninja, thank you so much. Obviously I'm a total noob at web dev and css. That works! 

Will spend significant time in the documentation you linked. Thank you!

Share this post


Link to post
Share on other sites
anet    0
anet

UGh...now I wonder why? Why the dark band I created in my gradient shows up at different distances from the top of the web page when I go to different pages in my menu. Checked it briefly in IE 10, iPad, and Chrome. Same problem.

I actually had the same problem with a nice image I had made for the background. (Which I uploaded to imgur and used custom css to load as site background, those steps were no problem.)

 

But I really want to make a nice color/texture difference in the background area above the nav bar and below it. However, whether I create those spaces in a single background image or whether I do it in this test gradient with a dark 'bar', the portion of the image I want to hang just behind the nav bar moves up and down. I can't seem to see any reason for it.

This is a slightly different question...maybe it needs moved? But it is still a problem with my gradient.

Thanks in advance for anyone willing to dig and point me in the right direction (places to learn) for answers! :)

Share this post


Link to post
Share on other sites
James B    436
James B

Each browser will render gradients differently depending on the browser. You could make a gradient images and apply that to the background. That way it would be the same in all browsers


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
anet    0
anet

Hi, James,

 

Thanks for your reply, but this is not a cross-browser problem. Just within Chrome for example, the 'dark bar' is at a different level depending on which page I go to via my navigation. It's the same problem whether the background is a custom css or a gradient image or an image. The image is not always in the same position in the background. Whether I load it in the site option color controls via wp media, or whether I host the image at a third site and do custom css to load it as background.

 

It's some problem with how pagelines is rendering background on different pages within the same site within the same browser.

 

Does anyone out there have a background with a horizontal area that stays in the same position in regard to each page, when using pagelines lite? This is a very weird problem for such a sophisticated theme.

Share this post


Link to post
Share on other sites
anet    0
anet

Hi, catrina, that is the site in question; I removed the gradient background, since I didn't want to scare off my client! lol

 

If you're online now I'll put it back in, so you can have a look.  Let me know, thanks! 

 

 

 

[Mind you, this isn't the final look I want, but I do want to find out why the positioning of the background changes on some pages. It means I can't design any background, gradient or image, to work on my site if it has any elements that look best at a certain position from the top of the page...]

Edited by anet (see edit history)

Share this post


Link to post
Share on other sites
anet    0
anet

Hello, all!

 

I guess catrina has been off-line since her comment.

 

I've managed to copy my site to a dev site, so I can make changes without scaring my client. Here's the dev site: http://www.laccdev.lightoflearning.org/

 
And I've uploaded a trial background with a horizontal element. Instead of doing this via custom css (as was required with the gradient fill), I set this as background image within the site options/color control page.  I also set it as 'fixed' instead of 'scroll'. And it's supersized.

 

Maybe it's because PageLines lite has had a few different upgrades since I last tried this, but now the problem is not there! Each page on the menu has the background image at the same distance from the top. Yay!!

 

SO...thread can be closed!

 

:)

Share this post


Link to post
Share on other sites
James B    436
James B

Hi Anet,

 

Glad you got this working. Just checked your link and yes the image is displaying perfectly :-)


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      every since Chrome introduce scroll anchoring (see chrome://flags) blog posts on my page start scroll automatically as soon as the user scrolls down a bit. It is super annoying and I don't know exactly what triggers the incompatibility with Chrome's latest feature that is supposed to improve usability.
      Since I don't know what causes it (Pagelines, or a Plugin), I would like to disable the feature using a CSS override that Google describes as follow:
      "Scroll anchoring aims to be the default mode of behavior when launched, so that users benefit from it even on legacy content. A CSS property overflow-anchor can disable scroll anchoring in part or all of a webpage (opt out), or exclude portions of the DOM from the anchor node selection algorithm. This property supports the following values when applied to an element E:
      overflow-anchor: auto (the default value) declares that the DOM subtree rooted at E is eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E. overflow-anchor: none declares that the DOM subtree rooted at E is not eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E." Do you guys happen to know how to use that property with the ROOT element so it applies to the whole page?
      Thanks
      Michael 
    • wyo22ski
      By wyo22ski+
      Hello,
       
      I'm basically a designer and understand a little on how to change CSS, etc., so please excuse my ignorance...  I recently upgraded to the newest platform from the DMS and my old DMS theme no longer functions.  I'm trying to replace the image slider that my Horizon Photography Theme (Nick Haskins) had created.  The Impulse image slider seemed the closest to what I need, but there are problems.
      It seems the the Impulse section for sliding images defaults to the image width, no the height.  I can change the Impulse stage height and width, but this does nothing to the internal content.  For instance, if I change the height to 200 pixels, the image remains the full width and only shows a cropped section.  I would like the ability to change the Impulse height, and have the image height fit space. 
      I've put this custom CSS in, but again, this only controls the stage height of Impulse:
      .pl-sn-impulse .pl-impulse-cell .cell-wrap, .pl-impulse-container, .owl-stage-outer {
        width: 100%;
      }
       
      Any suggestions welcome.  Thanks 
    • Objectif-Mariage
      By Objectif-Mariage+
      Hello. 
      I have just realized that CSS (Less plugin) , is not working..... I have disable all plugins (except PL CUSTOM LESS and PL5) , and ... it's not working ... 
      It's not the first time. Usually I had trouble with a plugin name Autoptimize , but it's Desactivate now , all memory have been purge, and it's still not working! :-/ So it's not from this plugin. 
      NB : When I am logged on my website, if i go on the black wordpress dashboard bar, go on the PL icon, clic on </> LESS/CSS => then the page suddenly apply the CSS .... But As soon that i reload the page, nothing. I think the problem is that the plugin LESS/CSS does not load properly (if I can say that with my simples words).
      I order to keep the site "good looking" I have temporally copy/paste all my LESS code in a plugin : Script n Styles that apply the LESS/CSS code... but it's not a solution for long time.
      Can someone help me ? Did I do something wrong ? Is it an update ? 
       
      my website : https://www.wedding-photography-minneapolis.com
    • Jason
      By Jason+
      Feel free to delete this post if its not helpful or its just plain wrong.
       
      I though it might be useful to share how I customize the size of the builder. (reduce my eyestrain )
      1 - install stylerbot extension in chrome (stylerbot keeps this css every time you access the url)
       
      2- add this css to stylerbot for the site you are working on
      .CodeMirror {
          font-size: 14px;
          height: 600px;
      }
      .pl-workarea.pl-has-sidebar .pl-workarea-sidebar-container {
          right: 0px;
          width: 500px;
      }
      .pl-workarea.pl-has-sidebar .iframe-container {
          right: 500px ;
      }
       
      change sizes to suit.
       
      Cheers.
    • Jason
      By Jason+
      Hi.
      I can't seem to get the Teamwork section to accept custom css. I am trying to change the padding from 7em to 1em on the splash part
      I have tried
        .pl-sn-teamwork .pl-tw-splash {
          padding-top: 1em;
          padding-bottom: 1em;
        }
       
      This works in chrome inspect but when added to custom css nothing happens.
      I have also tried most of the classes I can see accoiated with this section but again nothng seems to happen.
      Any ideas?
×