Jump to content

Custom CSS not applying on WHMCS 8?


Recommended Posts

10 minutes ago, brian! said:

you often have to add !important to the CSS changes - are you doing that?

and I assume the file is called custom.css and not cusom.css ?? πŸ™‚

Hi Brian,

Yes, it was just a typo. My mistake.
I'm trying to edit the header and footer colour.
Is the custom.css file the correct place to do it?
TBH, I'm unsure where to edit it exactly. Searching hasn't helped much.

I've tried the Theme.css file as well. Not winning.
Could you possibly give me some guidance with the CSS?

Thank you,
Enjoy your weekend.

Link to comment
Share on other sites

1 minute ago, SpaceIgniter said:

Could you possibly give me some guidance with the CSS?

it should be in the /css/custom.css file within your child theme folder - the file won't exist by default (even in the main 21 theme), but that's where WHMCS would expect to find custom.css changes.

there was a bug in v8.1 where the path to custom.css failed in certain environments (e.g Windows), but assuming that's not occurring to you, then the above should work... there was a hotfix released for that bug, though updating to v8.1.1 would probably achieve the same goal.

Link to comment
Share on other sites

1 minute ago, brian! said:

it should be in the /css/custom.css file within your child theme folder - the file won't exist by default (even in the main 21 theme), but that's where WHMCS would expect to find custom.css changes.

there was a bug in v8.1 where the path to custom.css failed in certain environments (e.g Windows), but assuming that's not occurring to you, then the above should work... there was a hotfix released for that bug, though updating to v8.1.1 would probably achieve the same goal.

Thanks., I updated last night. It's a Linux Server. It made no difference.

Link to comment
Share on other sites

10 minutes ago, brian! said:

any chance of CloudFlare or some other caching option preventing changes from showing immediately ??

HI Brian,

I'm not signed up with CloudFlare or any other CDN or caching service.
I've taken the example from the thread you posted to test.
This is the content of the custom.css file:

Quote

Β 

/* *****************************************************

Β  Β  ** Custom Stylesheet **

Β  Β  Any custom styling you want to apply should be
Β  Β  defined here.

***************************************************** */
.footer {
Β  Β  background-color: #000000;
Β  }

Β 

Β 

Edited by SpaceIgniter
Link to comment
Share on other sites

5 minutes ago, brian! said:

for a child of 21, I think I posted in that thread that it should be...


footer.footer {
    background-color: #000000 !important;
  }

that for me is working in a child theme.

Great stuff Brian,

Really appreciate it. That sorted the problem.
I also renamed the Theme directory from twenty_one_custom to twenty-one-custom.

Could you possibly assist with the code for the Header colour too please?

Thanks so much πŸ™‚

Link to comment
Share on other sites

Managed to fix the Header Brian,

Quote

Β header.header {
Β Β  Β background-color: #(colourIchose); !important;
}

Could you please help me change the Header Links Colours?

My CSS skills aren't that good yet.

Edit: seems the Header is still stuffed. Won't change colours.

Edited by SpaceIgniter
Link to comment
Share on other sites

41 minutes ago, SpaceIgniter said:

Could you possibly assist with the code for the Header colour too please?

depends what you're defining as the header... e. g you could copy the above code, rename footer to header and it would colour the header to black. πŸ™‚

header.header {
    background-color: #000000 !important;
  }

felRIMv.png

if you use .navbar-light instead of header.header, then....

GoDM9E0.png

9 minutes ago, SpaceIgniter said:

Edit: seems the Header is still stuffed.

is that a technical term? 😜

10 minutes ago, SpaceIgniter said:

Could you please help me change the Header Links Colours?

footer.footer {
    background-color: #000000 !important;
}
  
.navbar-light {
    background-color: pink !important;
}
  
.main-navbar-wrapper {
    background-color: red !important;
}

1bIQC1m.png

ideally, you will probably need toΒ  use # hex colours in those CSS lines, I was just saving time by using the colour names. πŸ™‚

btw - right clicking on any element in the browser will be your friend for doing this... you should then be able to identify the relevant class or ID that needs to be changed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated