What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

HTML and External CSS Not Working

Ahr Aitch

New member
Joined
Aug 12, 2023
Messages
11
Reaction score
0
HTML Coins
14
I have a couple of short files listed below. The HTML file attemptt to define a class called .mastheadDiv within Div tags and to invoke a style for the text within the Div tags using CSS contained in an external file. I had this working until I changed the CSS file making an error. I deleted the change, but the code still doesn't do what I want. The text in the Div should appear in an area bounded by a doule border with a tan background and text color in brown.

I composed in VS Code. All the files are in a folder. That folder contains subfolders that will contain images, scripts and styles. The CSS file (mastheadDiv.css) resides in the styles subfolder. The html file (newHTML.html) resides in the top, project folder.

The problem(s) might exist in the HTML or in the CSS; I don't know. I tried to keep the code simple as I'm only beginning to learn to code HTML and CSS. There might be problems in the strucdture or syntax of either or both files.

I've looked at this for so long I cannot see it freshly in order to spot my problem. Any help would be appreciated.

HTML file (newHTML.html)
```
<!DOCTYPE html>
<html>
<head>
<title>
527 Clan
</title>
<link
rel="stylesheet"
href="Styles/mastheadDiv.css">

<div class="mastheadDiv">
The Hutchins Clan
</div>
<script>
</script>
</body>
</html>
```

CSS file (mastheadDiv.css)
```
.mastheadDiv {
border: 5px outset rgb(64, 1, 1);
border-style: double;
background-color: rgb(237, 228, 215);
text-align: center;
color: rgb(168, 26, 26);
}
```

ps: If there is a tool or convention for showing code samples that I should use, please tell me.
 
The problem could be that I there us n incorrect file path or the CSS file name and extension are not correct. Double check on these first and see if the problem still persists.
 
Thanks for the response.

The issue is resolved. I don't recall what I did to resolve it.
 

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back