I have a folder in my root directory that is candyfive and it has my html website that is properly working and a domain is pointing to it, I have a subfolder inside candyfive that is named "portal". It is an admin panel of the site with its own css and images.
The problem is that the site in candyfive folder is loading correctly but the site in portal is not loading any image or css.
The link of css in my portal admin site is
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
What should I add in this code to make it work in subfolder ?
Here is the site structure :
candyfive/portal/index.php
candyfive/index.html - is working fine
candyfive/portal/index.php - css and images not loading ?
Use
<link href="../css/templatemo_style.css" rel="stylesheet" type="text/css" />
instead of:
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
.. Is used to go up in the directory tree stucture..
Related
I deploy the Laravel9 project to the centos server. (https://fullstacktrainingclass.com), but got a display problem on the live server, below is a CSS list that was added with the asset command.
<link rel="stylesheet" href="{{asset('assets/css/magnific-popup.css')}}">
<link rel="stylesheet" href="{{asset('assets/css/content-box.css')}}">
<link rel="stylesheet" href="{{asset('assets/css/contact-form.css')}}">
<link rel="stylesheet" href="{{asset('assets/css/media-box.css')}}">
<link rel="stylesheet" href="{{asset('assets/css/skin.css')}}">
I check the view-source:https://fullstacktrainingclass.com/ and all CSS files were correctly loaded, but display wrong (they display correctly on the local machine).
Any advice or guidance on this would be greatly appreciated, Thanks.
I’m a beginner web developer, I need help as my web page img updates do not auto refresh on client side devices. I’ve tried adding ?v=1 to img src and css. Does not work. Tried full hosting img url in css. Does not update.
Is there a way to clear the pc and mobile devices cache so my page updates everywhere when adding content and changing background img.
head...
<!--custom stylesheet-->
<link rel="stylesheet" type="text/css" href="css/style.css?v=1">
<link rel="stylesheet" type="text/css" href="css/main.css?v=1" />
body...
<img src="img/logo.webp?v=1" alt="logo" />
stylesheet...
background: url(../img/landing/body2.webp?v=1);
I figured it out, I was editing the img files and saving to original file names. This caused problems with the client side image. So I renamed my img and added a date time stamp as ?v=(current date). I added the date time stamp to img, url, src in html body and head css and everywhere I edited something.
head...
<!--custom stylesheet-->
<link rel="stylesheet" type="text/css" href="css/style.css?v=30Jun2020125632">
<link rel="stylesheet" type="text/css" href="css/main.css?v=30Jun2020125632" />
body...
<img src="img/logos.webp?v=30Jun2020125632" alt="logo" />
stylesheet...
background: url(../img/landing/body2.webp?v=30Jun2020125632);
My magento CSS is not loading, and when I try to view source, I noticed something on its src..
<link rel="stylesheet" type="text/css" href="C:\Program Files (x86)\Zend\Apache2\htdocs\myecommerce-local_comhttp://myecommerce.com/skin/frontend/base/default/css/style.css" media="all" />
its look like there's a problem in source file.
It should be like this
<link rel="stylesheet" type="text/css" href="C:\Program Files (x86)\Zend\Apache2\htdocs\myecommerce-local_com\skin\frontend\base\default\css\style.css" media="all" />
What should I do? to change the source of my style?
Thanks
Are you using an Addon like GT Speed do combine/reduce your JS and CSS files? I uninstalled it and the problem was solved.
When I publish web MVC3 to a virtual directory style of site not view.
Link css file incorrect: /virtual directory/content/abc.css instead of /content/abc.css
change
<link href="../../../../Content/Manager/SiteManager.css" rel="stylesheet" type="text/css" />
to
<link href="#Url.Content("~/Content/Manager/SiteManager.css")" rel="stylesheet" type="text/css" />
~ gives you the root.
UrlHelper.Content converts virtual to the correct absolute path regardless of the directory structure that you have on dev, stage, prod,...
<link href="http://www.../default.css" rel="stylesheet" type="text/css" />
Could not edit 'http://...' because it is not in the Web site.
I get this error box every five minutes, how do I get it to stop telling me this?
<link runat="server" id="defaultCss" rel="stylesheet" type="text/css"/>
and on your code behind
defaultCss.attributes.add("href","http://www..../default.css");
if your css is in your website then you can use
ResolveUrl("~/default.css")
to get the url
or probably best practice is to add it to your app theme folder http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx and then not only will it be automatically added but you'll get intellisense
Well, seems like it's because you're including an href that points to a URL, instead of a relative web path.
Instead of
<link href="http://www.mysite.com/styles/default.css" rel="stylesheet" type="text/css"/>
use
<link href="/styles/default.css" rel="stylesheet" type="text/css"/>
Also, make sure your closing
/>
is valid in terms of your Doctype.