I've been trying to put a border top on a bunch of hyperlinks to separate them from the title (for a school homework) but it's not working and I'm trying this since over an hour already.
This is the CSS code of the #menu which contains my hyperlinks:
#menu {
color: #ffffff;
padding: 10px 0px 10px 0px;
text-align: center;
border-top: 1px #669999;
}
<div id="menu">
<a href="#">HYPERLINK 1</a> |
<a href="#">HYPERLINK 2</a> |
<a href="#">HYPERLINK 3</a> |
<a href="#">HYPERLINK 4</a> |
<a href="#">HYPERLINK 5</a>
</div>
This is the picture how it looks like. (Yes I know it's ugly, but I have to work with the instructions)
your
border
syntax is incorrect, is missing the style ofborder
,should be
<br-width> || <br-style> || <color>
Check
border
syntax hereNotes
isn't meant to create spaces, use insteadmargin
in CSSpadding
and your hex colorsYour border-top is property is missing the border-style attribute. Try the following. You can find out more here: https://developer.mozilla.org/en/docs/Web/CSS/border-top
You need to use
solid
in between, else the default value doesn't have anything.Check the initial values to be:
Working Snippet
And not a good idea to use
for laying out purposes. Try usingmargin
: