I have placed bootstrap.min.css and bootstrap.min.js in assets/stylesheets and assets/javascripts, respectively. When I run my app locally, I get the styling that I expect. Further, if I view the source locally I see the following tags:
<link rel="stylesheet" media="all" href="/assets/comments.self-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css?body=1" data-turbolinks-track="true" />
(there are many other tags like this one)
I have the same setup on a DigitalOcean Droplet, but the css and javascript doesn't seem to be working.
If I view the source on the server I see tags like this:
<link rel="stylesheet" media="all" href="/stylesheets/application.css" data-turbolinks-track="true" />
<link rel="stylesheet" media="all" href="/stylesheets/bootstrap.min.css" data-turbolinks-track="true" />
Something doesn't seem to be rendering properly. This is probably my lack of experience showing, but I really have no idea how to proceed here.
Any ideas?
Related
In our spring Application in one of the JSP pages, we have a link
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css"></link>
When we run the Project in local environment css works but it does not work in different environment
In the other environment CSS URL being
<link rel="stylesheet" href="/myapp/css/jquery-ui.css">
when we remove the App name(request.getContextPath()) below this
<link rel="stylesheet" href="/css/jquery-ui.css">
The css works in the other environment.
***1. ***In Local System, the Below URL is Working perfectly.******
<link rel="stylesheet" href="<%request.getContextPath()%>/css/bootstrap.min.css"></link>
When we remove the ContexPath() means the CSS didn't work
<link rel="stylesheet" href="/css/bootstrap.min.css"></link>
How to handle this issues in local and other environment?
try this
<link type="text/css" href="<%=request.getContextPath() %>/resources/css/main.css" rel="stylesheet"/>
I'm facing a problem when our application is deployed in IIS. The styles are not applying to the content page but everything was working fine when I was running it through VS 2010.
This is what I have given in the master page.
<link href="Styles/style.css" rel="stylesheet" type="text/css" />
The above code which I have specified will apply only for the Home page which is in the root directory but when I navigate to so other module styles are not applying to those page which are inside other folder.
I searched in Google and I tried many options like
<link href="./Styles/style.css" rel="stylesheet" type="text/css" />
<link href="../Styles/style.css" rel="stylesheet" type="text/css" />
<link href="~/Styles/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#import 'Styles/style.css'; </style>
None of the above things are working even for home page also which used to work before. Please let me know some suggestions so I can proceed further.
<head runat="server">
<link href="~/Styles/style.css" rel="stylesheet" type="text/css" />
</head>
it will work and load your css on every page
try with adding the root/domain in a dynamic way before the styles folder in ur code.
One of my stylesheets doesn't seem to load every style. I've read everything i can find but the issues that people usually have are obvious things to me but i can't seem to figure out my own issue. I have a site made using Razor and this is where i call my stylesheets in the head section.
<link href="#Url.Content("~/css/reset.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/css/jquery-ui-1.10.1.custom.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/css/searchLayout.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/css/searchSkin.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/css/skin.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/css/AvailabilityLayout.css")" rel="stylesheet" type="text/css" media="screen" />
<link href="#Url.Content("~/css/AvailabilitySkin.css")" rel="stylesheet" type="text/css" media="screen"/>
<link href="#Url.Content("~/css/Home.css")" rel="stylesheet" type="text/css" />
The issue seems to be with the AVailabilitySkin.css and sometimes AvailabilityLayout.css. So for example i have this code in AvailibilitySkin.css:
td#price h2, td#price h4
{
text-align:center;
}
And it doesn't get picked up, I don't even see it being overwritten by another style or anything. But if I add the same code to the Skin.css file then it works perfectly fine. I can't add all my styles to Skin.css so i can't just put that style in there and call it a day. It has to be separated, right now the site is being developed locally so unfortunately i cannot post a link to the site but if anything is needed (like more code) please let me know. I haven't been able to find the issue and I've tried adding #charset "UTF-8"; at the top of the stylesheets and it didn't really do much.
Problem has been fixed guys/gals. In the end it was just another mistake by me and it wasn't coming up in the Console and Visual Studio wasn't flagging it as an issue. It was mostly just a missed single quote and another programmer here ran the code through WebStorm and it came right up and fixed it. Thanks for the help and sorry for the dumb mistake question.
I would like to have my Meteor app serve multiple css pages for various media types. For example:
<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
<link rel="stylesheet" type="text/css" media="handheld" href="handheld.css" />
How would I do this?
/packages/meteor/package.js
defined that .css files should be bundled.
However, taking a close look at docs.meteor.com, we can find this information:
CSS files work just the same: the client will get a bundle with all the CSS in your tree (excluding the server and public subdirectories).
That last part is the interesting bit, if you place your CSS files in /public they will not get bundled together. Instead app/lib/bundler.js does the following around line 517:
files.cp_r(path.join(project_dir, 'public'),
path.join(build_path, 'static'), {ignore: ignore_files});
And server side, any files that are unresolved will also be checked in build/static, which means that when you put screen.css in /public you can keep using screen.css on the client.
I've just got a fresh Drupal 6 install. The CSS didn't work. Then I realized that a "?U" was appended, and Drupal couldn't find it. Does anyone know where to unset this?
<link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/admin.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?U" />
<link type="text/css" rel="stylesheet" media="all" href="/themes/bluemarine/style.css?U" />
the ?U (or really any alphabet) is just a method drupal uses to cache information. it has no relevance to the location of the file (ie, node.css and node.css?U is in the same location to drupal).
it sounds like you may have a different issue. perhaps you enabled your cache and moved things around? you may need to clear your cache. or, if you've modified your install variables perhaps you're picking up the wrong base path or something. it's hard to tell the exact issue based on the limited information given.
You're right. Its because of the cache. I configured nginx to serve css files directly. But after I modified the configuration, it works fine now. Thank you!
Did you install Drupal into a sub-directory? Like:
http://domain.com/drupal
This would certainly cause the problems you speak of, though Drupal should have properly accommodated for that.