External CSS not working for HTML pages. What is wrong with the code? [closed] - html

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
I am just learning to code. I am stuck on this external CSS exercise. Could someone please help?
The external CSS file is not being picked up by the HTML file.
body {
background-color: lightgoldenrodyellow;
}
hr {
background: lightgoldenrodyellow;
border-style: dotted none none;
border-color: grey;
border-width: 5px;
width: 7%;
}
<meta charset+ "utf-8">
<title>Joyce Lai's Personal Site</title>
<link rel="stylesheet" href="css/styles.css">
<hr/>
The directories are correct.
I have tried deleting the cache in the browser.
I made sure the directors are correct.
Syntax is correct.
The CSS is just not applying to the HTML files.
What else could be the problem?
Thank you. I am a newbie so your help is really appreciated.

Related

How to fix background image issue [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
With this application, I'm having some imaging issues in terms of getting the background image to appear behind the login form. I'm currently using a bootstrap template in order to make this site. I tried posting the background image using the .main-content div to no avail.
<div>
<style>
.main-content {
background-image: url('../../../../wwwroot/images/MacbookBackground.jpg');
}
</style>
</div>
https://github.com/zhadjah9559/HelpDeskTicket/tree/3.LoginAndDB
You can add your <style> in your _Layout.cshtml and your url should be /images/MacbookBackground.jpg , like below.
Your _Layout.cshtml head:
<head>
//...
<style>
.main-content {
background-image: url('/images/MacbookBackground.jpg');
}
</style>
</head>
Then in your view:
<div class="main-content">
<h1 class="display-4">Welcome</h1>
</div>
Result:

Everything is Aligned left [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
So I’ve tried the content-fluid tag as well as the meta tag <meta name=“viewport” content=“width=device-width, initial-scale=1, maximum-scale=1” />
You can check it out here: emotesheaven.com/dev1987 for a live example of the issue occurring as I can’t post images. I find it strange as the website on desktop looks fine, but only on my iPhone 7 it appears weird. Thanks!
To fix the title text add this to your code.
#media screen and (max-width: 780px){
.intro .intro-title {
color: #fff;
font-weight: 600;
font-size: 2rem;
}
}

My html and css are not linking ( i have searched everything and i cant solve this) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I recently started learning HTML and CSS. I've been trying to link my css for hours. I've searched more than 10 forums but nothing seems to be solving my issue. Ive tried to change the order of the [href="stylesheet.css" rel="stylesheet" type="text/css"], I've tried using other browsers, I've tried to clean my cache and obviously my html and my css are in the same folder.
Here is a screenshot of my html:
https://i.stack.imgur.com/PRYNU.png
Here is a screenshot of my css:
https://i.stack.imgur.com/v5fvP.png
Here is the live preview of my html:
https://i.stack.imgur.com/fP9LJ.png
Thanks in advance
It's because your CSS it's wrong, try this.
a { color: red; text-decoration:none }
It's not necessary a style in a .css file
In your css:
Don't say a{style="..."}, you use style="..."in your HTML-tags.
Correct way
a {
color: red;
text-decoration: none;
}
or
a{color:red;text-decoration:none;}
if you want to keep it in one line.
I don't think there is another mistake, the only thing I can come up with is that your CSS file is not in the same directory as your HTML file. If you want to have it in a different location, you have to put the path in your href.
Is the css file located in the same folder as the html file?
You have to remove the style=" part and the " near the end of line 1 in your css file. It breaks the stylesheet and your styles are not apllied because of this.
Greetings, Mario.
you can add ?=1 in front of your stylesheet.css?=1. It should resolve your issue

Some Content Overlapping Sidebar [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
so I'm new to CSS and HTML. I'm in the process of modifying a basic code for my blog on Tumblr, and I noticed that only two posts don't overlap my sidebar. I don't know what's wrong or how to fix it. Please help.
Here's my blog, so you can see what I mean: X
Here's my code, in case that helps: X
Thank you.
There is an iframe inserted at the middle of the contents. please remove that, and the layout fixes.
You should set the margin for the #posts
div#posts {
margin: 60px 0 60px 450px;
padding: 20px 0;
}

HTML link is un-clickable for some reason [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am designing a website, I am using a text link(href) as logo, but for some reason it is not clickable. I inspected it with chrome and didn't find anything'suspicious. I even tried changing the html code, nothing works. Can someone shed light on this? Thank you.
The link is the logo in the top left corner, WhatAboutHTML
Here is the link: http://whatabouthtml.com
below is the code:
<div class="logo">
<h1 style="font-size: 24px;line-height: normal; margin-bottom: 0px;">
What About HTML
</h1>
</div>
Just add the following to your code:
#nav {
position: relative;
z-index: 9999;
}
Or put you nav in the right place. Which is inside the wrapper.