trouble making vertical line with class selector css

Viewed 24

Im sure this is crazy simple so I apologize for the silly question but I can't get a black vertical line to show up on my site. Here is the code I have:

'''html:
  <body>
  <img src="icon-01.png" class="logo">
  <p class="textlogo">Rob Reyes</p>
  <div id="vl"></div>
</body>'''

'''css:
.vl {
margin-left: 100px;
width::10px;
height:100px;
background-color: black;
}'''

stylesheet is linked and all other styling seems to be working. Whats going on here?

1 Answers

There are two colons after the width. There has to be one colon. So you have to remove the extra colon to work it properly.

And you are selecting class instead of id. Check your CSS selector.

Change in your CSS.

#vl {
    background: black;
    height: 100px;
    width: 10px;
    margin-left: 100px;
}

Or, change the HTML attribute.

<div class="vl"></div>
Related