The issue here is that in your CSS file, with .row.rectangle you are saying that any element that contains the .row class, and then the .rectanglebox class, or any element with the row class that has a child element with the .rectanglebox class will have these styles applied to it.

You can either change your code to class="row rectangleclass" or just change your CSS to simply .rectangleclass { ... }

Answer from Alex Peña on Stack Overflow
🌐
Hostinger
hostinger.com › home › tutorials › what is a css class? a complete guide to using the css selector
What is a CSS class? A complete guide to using the CSS selector
November 6, 2025 - For the rest of this tutorial, we’ll assume you are using an external style.css file. In your style.css file, define a class by typing a period (.) followed by a name of your choice. This name is the selector.
🌐
Study.com
study.com › courses › computer science courses › introduction to html & css
External Style Sheets in CSS: Definition & Examples - Lesson | Study.com
September 22, 2020 - Use classes on elements to apply specific properties for those at the element level. Use an id selectors specificity CSS rule to apply highly specific properties on a single id attribute on the page (try not to overlap the same property across these three levels as far as possible). And finally, use external style sheets for all your CSS to avoid conflict between external, internal, and inline styles.
🌐
Quackit
quackit.com › css › external_style_sheets.cfm
External Style Sheets
You then link to the external style sheet from all your HTML pages. This means you only need to set the styles for each element once. If you want to update the style of your website, you only need to do it in one place. Type CSS code into a plain text file, and save with a .css extension (for example, styles.css).
🌐
Sololearn
sololearn.com › en › Discuss › 856121 › class-and-id-selector-wont-work-in-an-external-css-file
Class and id selector won't work in an external CSS file | Sololearn: Learn to code for FREE!
</p> </div> and here is the stylesheet which i linked to the html the stylesheet's name is About.css body { background-image: url("http://www.afxgroup.com/template/AFX/img/header/about-image.jpg"); background-color: #cccccc; background-repeat: no-repeat; background-attachment: fixed; background-position: center; } #selector { background-color:white; } the matter is it don't apply the white background on the paragraph why ?
🌐
W3Schools
w3schools.com › css › css_external.asp
CSS External Stylesheet
CSS Reference CSS Selectors CSS ... CSS Browser Support ... With an external style sheet, you can change the look of an entire website by changing just one file!...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-create-classes-with-css
How To Create Classes With CSS | DigitalOcean
October 13, 2020 - In this tutorial, you will create a CSS class selector, which will allow you to apply CSS rules only to HTML elements that are assigned the class. CSS class …
🌐
W3Schools
w3schools.com › css › css_howto.asp
How to add CSS
An external style sheet can be written in any text editor, and must be saved with a .css extension.
Find elsewhere
🌐
W3Schools
w3schools.com › cssref › sel_class.php
CSS .class Selector
The CSS .class selector selects elements with a specific class attribute value.
🌐
W3Schools
w3schools.com › html › html_css.asp
HTML Styles CSS
The most common way to add CSS, is to keep the styles in external CSS files.
🌐
GeeksforGeeks
geeksforgeeks.org › css › how-to-link-external-css-to-html
How to Link External CSS to HTML? - GeeksforGeeks
External CSS is a method used to style multiple HTML pages with a single stylesheet. This approach involves creating a separate CSS file with a .css extension that contains style properties applied to various selectors (such as classes, IDs, ...
Published   October 8, 2024
🌐
HubSpot
blog.hubspot.com › home › website › the beginner's guide to css classes & .class selectors
The Beginner's Guide to CSS Classes & .class Selectors
June 14, 2023 - You can use CSS classes to group HTML elements and then apply custom styles to them. You can make classes and apply them to text, buttons, spans and divs, tables, images, or just about any other page element you can think of.
🌐
GeeksforGeeks
geeksforgeeks.org › css › types-of-css-cascading-style-sheet
Types of CSS (Cascading Style Sheet) - GeeksforGeeks
For quick fixes and small changes that don’t require a separate CSS file. When you need to override other styles for a particular element. If you’re working on emails or HTML-based applications where external CSS is not supported.
Published   July 11, 2025
🌐
Simplilearn
simplilearn.com › home › resources › software development › how to link external css in html
How To Link External CSS in HTML | Simplilearn
December 2, 2025 - External CSS (file) is a form of CSS which is used to add styling to multiple HTML pages at a time. It helps to design the layout of many HTML web pages simultaneously. Read more!
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
HTMLHelp
htmlhelp.com › reference › css › style-html.html
Linking Style Sheets to HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML> <HEAD> <TITLE>Example of SPAN</TITLE> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <STYLE TYPE="text/css" MEDIA="screen, print, projection"> <!-- .firstwords { font-variant: small-caps } --> </STYLE> </HEAD> <BODY> <P><SPAN CLASS=firstwords>The first few words</SPAN> of a paragraph could be in small-caps.
🌐
Next.js
nextjs.org › docs › app › getting-started › css
Getting Started: CSS | Next.js
2 weeks ago - External Stylesheets · Sass · CSS-in-JS · Tailwind CSS is a utility-first CSS framework that provides low-level utility classes to build custom designs. Install Tailwind CSS: pnpmnpmyarnbun · Terminal · pnpm add -D tailwindcss @tailwindcss/postcss · Add the PostCSS plugin to your postcss.config.mjs file: postcss.config.mjs ·
🌐
Hostinger
hostinger.com › home › tutorials › types of css: inline, external and internal definitions and differences explained
Types of CSS: Inline, Internal and External CSS Explained
April 23, 2025 - Internal CSS styles are included ... External CSS styles are stored in a separate file and can be linked to multiple HTML documents, allowing for global styling across an entire website....
🌐
Bricks Community Forum
forum.bricksbuilder.io › how to
How to load an external CSS inside the builder & How to import classes via code? - How To - Bricks Community Forum
August 14, 2022 - Hello, I have my own utility classes that I want to use inside Bricks Builder, and I have two questions: Is there an API I can use so that I can import all my utility classes into Bricks via PHP code? Preferably they can be imported as ‘Locked’ selectors inside Bricks.