Why is my styling not working in this code the border padding background color not working

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/bootstrap.css"></link>
    <style>
        [class*="col"] {
         padding : 1rem
         background-color : #oof
         border  : 10px solid #fff
         color   : #fff
    
        }
    </style>
</head>
<body>
    <div class="container-md border">
        <div class="row">
            <div class="col">column1row1</div>
            <div class="col">column2row1</div>
        </div>
    </div>
 <script src="js/bootstrap.bundle.js"></script> 
</body>
</html>

It looks like you just shared code without any context. Can you please tell us how we can help you.


I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

In CSS, it is important to include a semicolon at the end of each declaration (except the last one) to indicate the end of the declaration. This ensures that the CSS is interpreted correctly by the browser.
The background-color property should have a valid color value. In your code, you have set it to #oof , which is not a recognized color.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.