Bootstrap 5 button border color via css -- [Question Asked]

Issue

i try to make a page to control my amp via various js libs.

1.) Can you tell how do i can change the blue border of a selected bootstrap 5 button? (to a lighter green instead of blue, i want to avoid scss to make it as simply as possible)

Showcase:
https://schoko11.github.io/KEKO-WEB/#

Repo(sorry for the mess, it is not the newest version but the problems are visible): https://github.com/schoko11/KEKO-WEB

2.)When using this on a large screen you can see a white background on the bottom because the grey background does not stretch down the whole viewport height…. -> i set body to

height: 100vh;

Thanks!

Solution

1.) From the document on this page, you can change blue border only via CSS or Sass (Scss). The blue border actually is box-shadow on :focus and/or :active pseudo class.

2.) You have to set full height for allcont class.

<!DOCTYPE html>
<html>

    <body>
        <div class="allCont">
            <div class="wrapper-for-test">
                <button class="btn btn-primary" type="button">
                    A Button
                </button>
            </div>
        </div>
    </body>

</html>
body {
    height: 100vh;
}


.allCont {
    background-color: rgba(0, 255, 0, .5); /* for test only */
    height: 100%;
}

.btn-check:focus + .btn-primary, 
.btn-primary:focus {
    box-shadow: 0 0 0 .25rem rgba(255,0,0,.5);
}
.btn-check:active + .btn-primary:focus, 
.btn-check:checked + .btn-primary:focus, 
.btn-primary.active:focus, 
.btn-primary:active:focus, 
.show > .btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 .25rem rgba(255,0,0,.5);
}

/* for test only */
.wrapper-for-test {
    padding: 50px;
}

See it in action

Answered By – vee

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Posted in CSS

What is CSS?

Cascading Style Sheets, affectionately alluded to as CSS, is a basic plan language expected to work on the most common way of making website pages satisfactory.

CSS handles the look and feel a piece of a site page. Utilizing CSS, you have some control over the shade of the text, the style of text styles, the dispersing between passages, how segments are measured and spread out, what foundation pictures or tones are utilized, design designs,variations in show for various gadgets and screen sizes as well as different impacts.

CSS represents Cascading Style Sheets. It is a template language which is utilized to depict the look and organizing of a report written in markup language. It gives an extra component to HTML. It is for the most part utilized with HTML to change the style of website pages and UIs.

CSS is not difficult to learn and see however it gives strong command over the introduction of a HTML archive. Most normally, CSS is joined with the markup dialects HTML or XHTML.

Before CSS, labels like textual style, variety, foundation style, component arrangements, boundary and size must be rehashed on each website page. This was an extremely lengthy interaction. For instance: If you are fostering a huge site where textual styles and variety data are added on each and every page, it will be turned into a long and costly cycle. CSS was made to tackle this issue. It was a W3C suggestion.

CSS is utilized alongside HTML and JavaScript in many sites to make UIs for web applications and UIs for the majority versatile applications.
Who we are?

We are team of software engineers in multiple domains like Programming and coding, Fundamentals of computer science, Design and architecture, Algorithms and data structures, Information analysis, Debugging software and Testing software. We are working on Systems developer and application developer. We are curious, methodical, rational, analytical, and logical. Some of us are also conventional, meaning we're conscientious and conservative.

Answer collected from stackoverflow and other sources, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0