My html and css are not linking ( i have searched everything and i cant solve this) [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 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

Related

Having problems with the img tag in HTML [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 10 months ago.
Improve this question
I'm new to HTML coding, and I seem to be having problems with the <img> tag. My code, which I type in VS Code, is linked up to a Github repo, which is linked to Netlify which I use as the host for the site.
I'm trying to get an image into the <main> section of the code, but I just always get the alternative text for the image.
<img src="tratt_1080x1080.jpg" alt="lot182" class=".floatRight">
That's the code for the image.
.floatRight {
float: right;
width: 300px;
max-width:50%;
margin-left: 10px;
margin-bottom: 10px;
}
That's the CSS code for the class floatRight.
the result on the actual site
Your image and files should be in the same folder.
Also you don't need to use "." in your tag. Remove "."
In css we use a . to indicate that the following name is a class. So in html we don't need that name, because we already specify that it's a class. (remove the dot in the class atribute).
<img src="tratt_1080x1080.jpg" alt="lot182" class="floatRight">
There can multiple reasons of it why it is happening, but make sure you have you have spelled your image file correct in the img tag tally it with care even be careful about the extension of the image its '.jpg' or 'jpeg'.
Second make sure your image is place at the correct place location. According to your img tag it must be placed in the same folder as your html file is placed
Third correct your class attribute don't place a dot with it here, you should place it to access this class in CSS file with a dot not where you are defining it in the html tag

CSS to add some text at the end of the link [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
I have searched all over the internet but could not find a solution.
I need some CSS that will add some extra text at the end of the URL.
For example- www.google.com/search-url
I want something that automatically adds '/download' at the end of the url.
Update: If it is not possible through css, please share jquery/php code.
I don't think that what you're looking for is possible with CSS.
CSS is used to design your websites and improve the front-end of your site.
If you want to work more on the back-end and for example change strings(like your link) then you could use PHP.
You can't do it in CSS.
CSS can change how the link is displayed - e.g. a:after { content: ' (download)' } will mean links are followed by a piece of text - but it can't alter the actual content of the HTML, in this case the href attribute which governs where the link actually points.
You will need to do this in JavaScript or server-side.
Sorry but you might want to use PHP or maybe jQuery
This looks like an almost impossible thing to do with css but there is something you can try.
This is some code I've used lately to show the url of a link for print versions of the page.
a:after {
content: " [Link: " attr(href) "]";
color: #000;
text-decoration: none;
}
The part you can use is just a: after and the first line inside it. In your case it should be something like this:
a:after {
content: "/download";
}
I'm not sure if it will be part of the clickable link but you never know.
I't would be a lot easier and more logical to do this with, JavaScript or PHP or ...
The only way to do it in CSS is with content: (text) but it's actually better to do in HTML (or other language) in case you need to fix something.

My CSS does not seem to be working? [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
I'm having trouble with my CSS.
It's not working even though it is linked correctly to my HTML
document.
The files are in the same folder.
Both files are saved in the correct format.
From what I can see, I don't see anything wrong or missing from the
CSS.
The CSS
The HTML
It doesn't look like your css matches your html, you don't have any of those tags in your html so the css wont do anything.
Your html references class="header" (btw you are missing quotes around your class in your html, you should add those in.) your css just has header
You should have .header { ... } not just header {..}
You're using header class.
It should be in double quote.
i.e
In css file you've not added dot(.) before class header.
Class should be added with dot(.) and id with hash(#)
Try this :)
In HTML5, header is a tag.
You can use it
Ref. http://www.w3schools.com/tags/tag_header.asp

Remove line under navigation text [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
TLDR: Please help me remove the underline of the text in the navigation.
Context:
I am making a Mobile news application.
Problem:
I want to remove underlines on the text of the navigation.(Home, login)
<h1>ignore this code </h1>
https://jsfiddle.net/uatmt99g/
Look specifically at the nav div and everything inside.
Similar post I have found whilst researching the issue (click link):
Remove line under image in link
I have tried the following but may have not implemented it correctly:
using CSS to remove text decoration,
using CSS to remove styling of text,
Any help?
Thanks in advance
you are using link () tags. to remove those "underlines" simply use the css below
a {
text-decoration: none;
}
The text with the underlines are links, so they have basic styling that goes with a link, including a line under the text. In order to remove it, you must specify text-decoration: none; to your a.
https://jsfiddle.net/uatmt99g/1/
Add this after nav in the CSS.
nav a{text-decoration: none;}
Links acquire their own properties . you must declare with the #mynewpattern a{} format

Wordpress: move sidebar menu to the bottom [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 7 years ago.
Improve this question
Could anybody please suggest me a way to move the sidebar menu on this website to the bottom of the page: http://rencontresduvietnam.org/conferences/2016/search-for-life/ ?
I have played with CSS for a while but haven't got expected results :(
Thank you in advance!
Update
I tried the following as suggested by #Souljacker:
.sidebar-container {
position: static!important;
}
and as suggested by #c-travel:
.site-main .sidebar-container {
top: auto;
bottom: 0px!important;
}
The sidebar was moved to the bottom but it's ugly:
Is there a way to limit it to the end of the text?
Thanks.
You have couple of options.
Create the hook for the menu.
Change the menu in the template.
If you change it at your template files (the easiest) you have to go to your theme's folder and find for
sidebar.php
There must be the code that enables your menu to show up on your sidebar...
Mostly themes have the parts isolated, and the bottom should be on the file footer.php , if you are looking to insert it at the footer part, then you can just paste the code there... should work
.sidebar-container {
position: static;
}
This will get it back to the normal code flow.