JavaScript – Change the Background Color of DivTo change the background color of a div using JavaScript, get reference to the element, and assign required color value to the Show Example ConclusionIn this JavaScript Tutorial, we learned how to change the background color of a div using JavaScript. Bootstrap 5 Footer componentA footer is an additional navigation component. It can hold links, buttons, company info, copyrights, forms, and many other elements.
Video tutorial Basic exampleA basic example of the simple footer with text, links and copyright section. The background color is set via CSS class We put a mask on the copyrights section using RGBA code to outstand it. You can change the intensity of its color by manipulating the last value in the RGBA code. Advanced exampleAn advanced example of Bootstrap Footer. Components used: Floating social buttons, inline outline form, text, 4 column grid with links inside and copyright section. We also applied a dark background by using White background and secondary iconsOur new minimal design for the footer with subtle secondary-colored icons. Supported contentFooters can hold multiple different components. Below a few of the most common examples of footer usage. CopyrightsAs mentioned before - we put a mask on the copyrights section using RGBA code to outstand it. You can change the intensity of its color by manipulating the last value in the RGBA code. LinksYou can adjust the number of the columns by using grid system. TextFor more advanced text options have a look at the Typography docs or Text utilities docs . ImagesFor more advanced images options have a look at the Images docs . Iframe (embeds)For more advanced iframe options have a look at the Embeds docs . IconsFor more advanced icon options have a look at the Icons docs and Buttons docs. ButtonsFor more advanced icon options have a look at the Buttons docs. Buttons dark themeFor more advanced icon options have a look at the Colors docs and Theme docs. Call to actionAn example of Call to Action scheme within the Footer. FormsSimple usage of the inline form within the Footer and with use of the grid. By default it's left aligned. For more advanced icon options have a look at the Forms docs and Grid docs. Form centeredAn example of centered form within the Footer. For more advanced icon options have a look at the Horizontal alignment docs. Form dark themeAn example of dark theme Footer with the form inside To use forms properly on a dark background add For more advanced icon options have a look at the Colors docs and Theme docs. Colors As mentioned before - the background color is set via CSS class When changing the color of the footer to the darker remember to change also the color of the containing elements. In the example below, we add You can also use our Footer Generator to test different color variants. Footer generatorAlignmentBy default, all elements inside the Footer are left-aligned on every screen size. However, you can easily change it and center it on all screen sizes or only on the specific breakpoint. For more advanced icon options have a look at the Alignment docs. You can also use our Footer Generator to test different alignment variants. Footer generatorLeft-alignedDefault left-aligned Footer Always centered Add Centered on small To center elements of the Footer only on small screens add With these classes, elements will only be centered on screens smaller than To learn more about Bootstrap breakpoints read Breakpoints docs. |