0

I asked earlier already. I am completely new creating websites, and I have to turn in my project which is a website, so I have to get help from here cuz I have no option. I am really struggling with this, so I hope you guys can help me...

I have to link all my HTML pages on a single CSS sheet, but it is not working for some reason. For example in the body how you can see in the code

my other question is that i want a border for my website like this:

enter image description here

How can I make it look like that? thank you in advance!

body{
  background-color: black;
  margin-top: 45px;
}

.backdrop {
  background: url(../images/header.JPG) center;
  background-size: contain;
  margin: auto;
  margin-top: 185px;
  width: 85vw;
}
   
.text {
  text-shadow: 0 0 9px white;
  color: white;
  border: 4px solid;
  background: rgb(59, 2, 6);
  mix-blend-mode:multiply;
  font: bolder 10vw 'arial';
  text-align: center;
  margin:0;
  animation: glow 3s infinite;
}

@keyframes glow {
  0% {
    text-shadow: 0 0 10px white;
  }
  15% {
    text-shadow: 2px 2px 10px rgba(255, 255, 255, 1),
                 -2px -2px 10px rgba(255, 255, 255, 1);
  }
  30% {
    text-shadow: 2px 2px 4px rgba(255, 255, 255, .7),
                 -2px -2px 4px rgba(255, 255, 255, .7);
  }
}
    
ul li {
  float: left;
  list-style: none;
  margin-right: 1em; 
}
 
li a {
  color: #544738;
  text-decoration: none;
  float: left;
  font-size: 25px;
  padding: 10px;
  padding-top: 30px;
  margin-left: 155px;
}
 
li a:hover {
  color: #740001;
}

 .aboutme {
    background-color: aqua;
    margin-left: 50px;
}



#major{
    
    background-color: black;
}
<html>
<head>
<meta charset="UTF-8" />
<title>About me</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>

<body class="major">
    
<h1>About me</h1>
    
    </body>




</html>
Pradeep
  • 9,667
  • 13
  • 27
  • 34

2 Answers2

0

Your CSS body tag looks fine, but, the other two tags are redundant. You created an "id" called major and included it (as a class) in your websites body tag. Neither is needed as it repeats the styles you listed in the CSS body tag.

Keep this part of your CSS:

body{
  background-color: black;
  margin-top: 45px; }

Delete this part of your CSS:

#major{
background-color: black; }

Change your HTML: from <body class="major"> to <body>

The link to your CSS document appears ok. If it isn't working, open the document in your browser and verify that you listed it correctly in the tag.

<link href="css/main.css" rel="stylesheet" type="text/css">

Listing it as href="css/main.css" suggests that the file is not in the same directory as your HTML document. Using a relative path requires a moment to think about the path you would have to follow to get to the document you are linking to. The answer to this question does a good job explaining a Relative path in HTML

elbrant
  • 763
  • 5
  • 16
0

Try to clear your browser cache, if you are on PC you can just hit ctrl+shift+del (chrome, firefox), select 'cached images and files' and click 'clear data'. Refresh your page.