0

I want the words "Check Out" to show up in a CSS box, however I am not able to do this. Here is my code:

<!DOCTYPE html>
<html lang="en">

<head>
<title>Box</title>
</head>

<style>
.boxed {
    width: 200px;
    padding: 5px;
    border: 5px blue;
    margin: 0;
}

.shadow {
position: relative;
max-width: 270px;
box-shadow: 1px 1px 1px rgba(0,0, 0, 0.2)
}
</style>
<body>
<div class="boxed">Check Out</div>
</body>

JM0
  • 1
  • 1

3 Answers3

0
  1. The style tags go inside the head tags.

  2. like Brendan mentioned, you were missing the closing html tag.

  3. Also, for the border you just had

    .boxed { border: 5px blue; }
    

You need to specify which type of border, like is it solid, dotted, dashed?

So I added

.boxed { border: 5px solid blue; }

<!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Box</title>
    <style>
    .boxed {
        width: 200px;
        padding: 5px;
        border: 5px solid blue;
        margin: 0;
    }
    
    .shadow {
    position: relative;
    max-width: 270px;
    box-shadow: 1px 1px 1px rgba(0,0, 0, 0.2)
    }
    </style>
    </head>
    <body>
    <div class="boxed">Check Out</div>
    </body>
    </html>
CRABOLO
  • 8,605
  • 39
  • 41
  • 68
0

You need to declare the third part of a border. A border is line thickness(px) color, and type: dashed, solid, transparent and a lot of others. Google it.

Dominofoe
  • 603
  • 7
  • 18
0

The div is visible. the only thing you missed was a background (pretty, pretty) and maybe if you can't see it on screen is because of it's display, position, size, etc.

if you want to see it go to http://jsfiddle.net/rgqfjb1v/

also check if you have that last </html>

I also added solid for the border, like this: border: 5px solid blue;

'YOU MISSED THE SOLID OPTION'

creptor4
  • 121
  • 9