CSS Help With Bootstrap Theme

boh
CSS Help With Bootstrap Theme
boh@04ec546f Wednesday 19th April 2023, 22:41:19

Did a fresh install of flatboard 3.1 on my local server and all is good with the exception of trying to style the bootstrap theme.

Come across an issue where I cannot seem to change the background color of a category title.

When I view the inspect feature of Edge it says the css is .btn.btn-sm but styling it doesn't work.
.btn.btn-sm{background-color#98caec !important;}
a.btn.btn-sm{background-color#98caec !important;}


I also see this when viewing page source and it looks like it might be an inline style which I cannot find when searching though all pages.

<p class="tile-title"><a class="btn btn-sm" style="background-color#0000ff!important;color:white!important" href="view.php/forum/general"><i class="fa fa-folder"></i> General</a></p>


Any help greatly appreciated.

Last modified by SurveyBuilder-Admin on Thursday 27th April 2023, 17:10:00
SurveyBuilder-Admin locked the discussion.

Replies 7
SurveyBuilder-Admin
SurveyBuilder-Admin  Thursday 20th April 2023, 13:07:16

Ok, CSS the LAST IMPORTANT is the one it takes, anything that is not !important
for example

1. body{
2. color:blue!important;
3. color:green;
4. }

return is blue color

1. body{
2. color:blue!important;
3. color:green!important;
4. }

would return green color

1. a{
2. color:blue!important;
4. }
5. <a href="#" style="color:black;">test</a>

Will return blue

1. a{
2. color:blue!important;
4. }
5. <a href="#" style="color:black!important;">test</a>

Will return black

The style attribute is the closest important your going to get.

Last modified by SurveyBuilder-Admin on Thursday 20th April 2023, 13:37:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

boh
boh@04ec546f  Saturday 22nd April 2023, 18:09:10

Thanks for your reply. I understand all of what you are saying.

The problem is I cannot find the css that controls
<p class="tile-title"><a class="btn btn-sm" style="background-color#0000ff!important;color:white!important" href="view.php/forum/general"><i class="fa fa-folder"></i> General</a></p>


And all my css styling manually isn't working. I am hoping someone here has a better understanding of where this line of code resides in the flatboard files so I can change it there. When an update occurs I will change it again unless there is another solution that I am unaware of.

SurveyBuilder-Admin
SurveyBuilder-Admin  Sunday 23rd April 2023, 03:57:33

1. style="background-color#0000ff!important;color:white!important"


this is the stylesheet, the style attribute makes the CSS so any outside CSS file wont affect it. So in-order to change the color and background color you would have to change that manully CSS or you can do it with JS(JavaScript) for example

1. window.addEventListener('load',function(){
2. let title = document.querySelectorAll('.tile-title');
3. for(let i=0;i<title.length;i++){
4. title.querySelector('.btn').style.{cssStyle} = {cssStyleValue};
5. //add more down here
6.
7. }
8. });


[i] Note: You can have a editor that scans through files for content of what your looking for.

Last modified by SurveyBuilder-Admin on Sunday 23rd April 2023, 04:04:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

boh
boh@04ec546f  Wednesday 26th April 2023, 02:30:42

Once again thanks for trying to help. I do understand that I cannot change the inline style. What I cannot seem to find is the actual file the style resides in. I've searched every php file in the flatboard hierarchy and it isn't anywhere that I can see. I would have thought it would be in the bootstrap theme but it is not so I searched all the flatboard php files and it isn't there either. As for the javascript, thanks but I don't understand javascript so it doesn't help me. I am a html/css guy only.

SurveyBuilder-Admin
SurveyBuilder-Admin  Wednesday 26th April 2023, 17:39:35

  Ok, I found it
image

It's all 3 of those lines, hopefully this helps

Last modified by SurveyBuilder-Admin on Wednesday 26th April 2023, 20:00:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

boh
boh@04ec546f  Wednesday 26th April 2023, 23:55:10

Wow!! Way to go! I bet I looked over that file a few times and still never seen it. Your awesome! Really appreciate all your help on this.

SurveyBuilder-Admin
SurveyBuilder-Admin  Thursday 27th April 2023, 01:21:05

  No problem, I wasn't going to give up easily until the people are satisfied with the results. I'm glad that solved your problem, anymore questions just let me know. Also can't wait to see your theme!!!

Last modified by SurveyBuilder-Admin on Thursday 27th April 2023, 01:22:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Suggested Topics
mk
mk@b8500609 started Functions
General Questions
23.6K 4
Want to read more? Browse all categories or view latest topics.