Jump to content
zymondee

Add Custom Css Class To Boxes

Recommended Posts

zymondee

I want to color the h3 headline in a dark gray and the following text also in a gray tone.

How can I do this?

If I have understood it right I shall use the field in the bottom of the edit page meta settings (choosing boxes)

There I find the Custom CSS Class

and the field with this text above.

"Att custom css class to these boxes"

Is there any video or good guide which describes how you shall write the syntax in this field?

I have looked into some CSS guides since I am a complete rookie on CSS and tried some but nothing happens.

I have used firebug and tracked it to the h3 header. And found this type of code if the text is gray.

#boxes .fboxtext { . 
font-size: 16px; . 
color: rgba(0, 0, 0, 0.4) }

But this line of code is nothing I can use in this field or is it?

Nothing happens when I insert and Save the Meta Settings.

Can someone please help me on this? I would be really thankful! :)

Share this post


Link to post
Share on other sites
batman

Hi zymondee

I´m a newbie too but you can try add in

PageLines > Site Options > Custom Code > CSS Rules

or in

Pagelines Customize (plugin)

For example you can add

#boxes .fboxtext { 
color: dimgray }

It is advisable to learn how to do this on your own too.

Check out http://www.pagelines...wiki/Custom_CSS

Also you can go

http://www.w3schools..._colornames.asp

or

http://html-color-codes.info/

and select the color as you like

You may also use color codes there, such as #C00000 , if you wish to use more specific colors.

If you post your site's url is more easy to resolve the issue.

;)

  • Like 1

Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Danny

Hi,

Did Batman's suggestion resolve your issue ?

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
zymondee

Thank you so much Batman!!

You made my day cause it worked like a charm!

But it would also be great to be able to customize it for single pages aswell I think.

It is a pity it does not work in the meta settings for the page as a described.

Cheers!

Hi zymondee

I´m a newbie too but you can try add in

PageLines > Site Options > Custom Code > CSS Rules

or in

Pagelines Customize (plugin)

For example you can add

#boxes .fboxtext { 
color: dimgray }

It is advisable to learn how to do this on your own too.

Check out http://www.pagelines...wiki/Custom_CSS

Also you can go

http://www.w3schools..._colornames.asp

or

http://html-color-codes.info/

and select the color as you like

You may also use color codes there, such as #C00000 , if you wish to use more specific colors.

If you post your site's url is more easy to resolve the issue.

;)

Share this post


Link to post
Share on other sites
zymondee

Yes!!

Hi,

Did Batman's suggestion resolve your issue ?

Share this post


Link to post
Share on other sites
Danny

But it would also be great to be able to customize it for single pages aswell I think.

It is a pity it does not work in the meta settings for the page as a described.

Cheers!

What do you mean ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
agumperz

I have a similar question. I would like to make a CSS change on one particular box--I need to add a border to the graphic on only that one box (rather than to all my boxes). 

 

1. I inspected the element to come up with the following selector: div.fboxgraphic a img{

 

2. Then I added this rule to the Boxes custom class field on the box i want to modify:  div.fboxgraphic a img{border-style:solid; border-width:5px;}

 

2a. if I understand correctly, this should:

add a 5px, solid border to any <img> tag 

contained within an <a>

contained with a <div> with class=fboxgraphic

 

No results. I can't tell if my selector is wrong, or if there is some other reason why my CSS rule is not being applied.

 

Thanks.

 

 

Share this post


Link to post
Share on other sites
James B

Hi there, you can target one box on the entire site. If you look slightly higher up the html code you'll see each box will be issued with an ID. You can use the box id followed by the items you want to target inside that box to make the changes. Also depending on which setup for you have for where the images are placed in the box (top,left,right) the css can change, so make sure you look for .inline_thumbs or .top_thumbs etc

 

 

#fbox_5
.inline_thumbs .fboxgraphic {
    border: 1px solid black;
    padding-top: 5px;
}

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
tamarpostma

Hi!

I have been having the same problem. I have used this code to target one of the boxes, unfortunately it did not work. But i really want to target a whole set of boxes.

 

I tried both these:

 .fbox_1387
.inline_thumbs .fboxgraphic {
    border: 1px solid black;
    padding-top: 5px;
border-radius: 0px 25px 25px 0px;}

 

and this(adding #boxes):

#boxes .fbox_1387
.inline_thumbs .fboxgraphic {
    border: 1px solid black;
    padding-top: 5px;
border-radius: 0px 25px 25px 0px;}

 

the id is 1387, which I found using firebug. I really want to change the look of all the boxes on that particular page, preferably using a background image. Is this possible?

 

Thanks,

 

Tamar

Share this post


Link to post
Share on other sites
tamarpostma

Should I use:

#boxes_clone_2 or

or .fboxes fbox

 

Why do I see fboxes and #boxes for seemingly the same thing?! Sorry, I'm just a beginner at this css, it's worse than learning french!

Share this post


Link to post
Share on other sites
Danny

Hi Tamar,

 

If it is just for that page, you can use the page id class, which is in the body class, you can find it using FireBug.

 

However, you can also use the Custom Class option which adds this class to your box set that can be used to style these boxes.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

Should I use:

#boxes_clone_2 or

or .fboxes fbox

 

Why do I see fboxes and #boxes for seemingly the same thing?! Sorry, I'm just a beginner at this css, it's worse than learning french!

 

You can use this which should help you.

 

.page-id-1183 .section-boxes {
background: red;
}

Which looks like this:

 

http://d.pr/i/XksW


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
tamarpostma

Yes! That worked... Thank you. Now only one last detail. I would like to have a border around each box. Is that possible too?

Share this post


Link to post
Share on other sites
tamarpostma

Figured it out!

.page-id-1001  .fbox{
background: white;
    border: 1px solid black;
    padding-top: 5px;
border-radius: 25px 25px 25px 25px;}

Share this post


Link to post
Share on other sites
Danny

Yup, thats possible, every box is given a unique ID, you can use these ID's to to style each individual box.

 

For example, your "digitaal lesstof" box has an ID of fbox_1324, so you can use that to style that box.

 

#fbox_1324 {
border: 1px solid red;
} 

http://d.pr/i/4dlC


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

No problem, happy to help!


Please search our forums, before posting!

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!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • yemoonyah
      By yemoonyah+
      Hi, even though I just got a SSL certificate, I can't get the green padlock to appear due to the following error:
      :A file with an insecure url of "http://yemoonyah.com/wp-content/plugins/pl-section-boxes/check.svg" was loaded via the javascript file: https://yemoonyah.com/wp-includes/js/jquery/jquery.js?ver=1.12.4 on line 3. The insecure URL may not be directly contained in the script file and may exist elsewhere."
      I figured if I delete and re-install the plugin it might fix the problem but will my boxes on the website still be there? Or do I have to redesign everything all over again if I delete the plugin and then re-install it?
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
×