External Css is not working with my HTML code, what is my error? - css

This is my HTML code which is not working in working with the css file located in other folder name css
this is my css code.
kindly help me and suggest me the correct changes.
Thank you

How are your folders structured?
In the header of you HTML file you state that the css file is called 'home.css' and is located in a folder called 'css'. And this folder should be in the same directory as your html file.

See if you can view your CSS file in your browser at the address you are specifying in your HTML. In other words, go to www.yourwebsite.com/css/home.css. If your CSS file does not show up, it is not at that address and you will need to determine where the file is actually located.
If you can view your CSS file at the address you have specified, but its style directives are not reflected on your pages, check to be sure they are not being overridden somewhere later in your CSS file.
As others have noted, your question is poorly formatted. Providing more information (i.e. URL, fiddle, directory structure, etc.) will likely get you more useful answers faster.

Related

CSS and img dont read on Github

I'm trying to upload one project on github but CSS and img wont read.
I have tried to upload it 2 times, and checked that files names is written with small letters and are the same in the name of the file and the same in the html code but it still wont work.
Site was build using bootstrap, it is first time for me using BS so i'm not sure if it is because of that.
I am attaching link to a site and link to my repositorie on github. are you able to see what problem is?
Link to a site:
https://veljko-premovic.github.io/Tindog/
Link to repositorie:
https://github.com/Veljko-Premovic/Tindog
thank you in advance
Veljko
You are serving your images from a folder called images, but there is not such a folder.
The same with CSS, you are serving your styles.css from a “css” folder that is non-existent in your Github repo.
Either create those folders and add the images and CSS in them, or in every “src=“, remove the folder name.
Your paths are wrong, they all point to images/something.png but the images are in the same root folder as index.html so it should just be
<src img="something.png">
same for the css

Css file doesn't affect after editing in SharePoint Online

I has a css file named styles.css and it was loaded in masterPage of sharepoint .I change this css file but not working. I make sure this css file already loaded in html page.I also clear cache but I don't know why it doesn't affect when I edit. Please help me, thank you so much!
It is not recommended to modify the online master page directly.
Firstly, you need to check if the CSS file is really imported.
Secondly,if the file is not imported, classic page you could upload CSS here.
modern page we should upload CSS with SPFX,here is a tutorial: https://github.com/hugoabernier/react-application-injectcss.
If the file is imported, first check whether the content of the file is displayed normally (excluding problems caused by encoding), then you can add ‘! Important’ after the style.

Bootstrap css file adding less files

I'm creating a site based on AdminLTE (v 2.3.0), a open source control panel template that uses bootstrap (v 3.3.5).
When I load my page in Google Chrome (v 48.0.2564.97 m) and use the developer tool (F12) in sources I notice that my content folder has a subfolder called less.
It is like:
Content/
├──less/
| ├──...
| ├──table.less
| └──...
The "..." means other files.
But here's the deal: I don't have any those files in my server and this table.less is generating problem to me.
So I did a test. One by one I remove the js and css files that I had referenced.
I discovered that when I add the bootstrap.css file this folder with all files appears.
Now my questions are:
Why this is happened?
How can I avoid it?
And if I can't how can I make my css file has priority above the less files?
PS:
I asked the 3rd question because normally the last css file to be add has priority when some property is overloaded. But in my case my last file is site.css, this file has definitions for tables, but when I open the page the properties of table.less has priority above my file and this is causing me problems.
You probably have a file called bootstrap.min.css.map or bootstrap.css.map next to the bootstrap css file. It's function is to reference the original source files and line numbers in your browser's developer tool section for each directive coming from your css file. If it were not there, you would always see bootstrap.css line 1 next to each css directive, which would not be very informative, this way you see the actual source structure that generated the css. It's all virtual, the less files are not there.

Need help on my javafx-css

I have this problem in my Java Eclipse
this happens when i add my CSS File to the Scene. And i really don't know what to do here
I have tried adding a Source Folder and inside the source folder is the Css file then adding it to like this scene.getStyleSheets().add("Resource/Css/style.sheet"
and this error is still showing can someone help me with this
If you have the file directly under src in Eclipse, you need to request it from there, not from a "Resource/Css" sub-folder.
Also, the filename is obviously style.css, not style.sheet.

ASP.NET themes and static contents

as you all know, ASP.NET includes each CSS stylesheet in the App_Themes's Theme folder inside the page. No discussion.
But now, I'm facing a little problem having lots of CSS files in a theme and willing to use a static content domain. I would like to load all the static content of my website from the static domain (not only CSS, but also icons, images, etc.), but let's now pay attention only to CSS.
My question is
Is it possible to override the behaviour of Page class, and for each CSS file found in Theme's folder, rewrite the <link> tag with the correct URL of the static content domain? I have nothing preventing me to deploy files into http://static.domain.com/App_Themes/Theme path, so at least adding a prefix to the tag is fine.
Thank you in advance.
Yes, you can. You can have a custom base page class write the CSS files it finds in the folder. Though, I'm not sure you can override the default behavior of the themes feature, so the easiest way is to move the CSS files outside of the default themes. Then, you can use the System.IO objects to read the directory, access the file, and generate the link.
HTH.
An alternate method is to write an http module. Have the module inspect the html being sent back to the client.
If it detects a style sheet reference, change the location that the style sheet is pulling from.
This works for the other items as well, such as images etc.

Resources