I have some pages that use the master page and apply a theme. Some of my pages are not using master pages, instead they have individual css files linked
<link href="../Style/pck.css" rel="stylesheet" type="text/css" />
Although the css works for regular pages for most cases, the body css is taken from the theme. I do not want that. I want that the body css should be taken from pck.css.
What to do?
On the pages that the CSS file is not working, have you checked to make sure that it actually loading the CSS file? (with the relative CSS link, it might not be working for pages that a deeper into your site structure).
Alternatively, I sometimes find that the needs to be the very first thing on the page or you force some browsers into compatibility mode and all hell breaks loose when that happens.
Related
I know my question is similar to: Bootstrap popup does not appear when include bootstrap.min.css
However it was not resolved and I am practically having the same issue (minus the JS).
I am currently designing my Bootstrap website using Pinegrow, everything looks fine in the software however I realized when I actually preview or upload the code to a browser parts of the website is being overridden, I just found out it's because of the bootstrap.min.css file.
The strange thing is my 'home', 'about me' pages are fine, however when it gets to 'skills', 'portfolio' etc pages the css from my custom file is overridden.
For example:
This is what my software shows
Preview from Pinegrow
And this is what happens when it is in a browser:
Preview from Browser
Things I have done
Some people suggested just deleting the .min file, however doing that mucks up the website.
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<!-- Custom CSS -->
<link rel="stylesheet" href="css/creative.css" type="text/css"> The custom css file is placed at the bottom in the html (someone said it provides priority to the custom file)
Using the !important rule doesn't work and I don't think it's the right to use it
I am using ID selections in CSS
Is the only solution to go into the .min file and edit the code from there? Is there a way to get my custom CSS code to override the .min instead? Would it help if i posted some of my code? Many thanks for your time.
I would have done so:
If a few page works, my opinion, problem in markup. If you don't use one header section for all pages, try to copy content from skills to about, then I would check the wrapper, and deeper structure first. Do you see any strange rules in development tools on skills page? (I'm learning, and I can only give you simple tips.)
hello i am in a fix on what to do with my current situation.
I am trying to implement an html5 blog template with Umbraco. My template loads the css files with the help of jquery for the sake of responsive design.
Now this is okay for the home page as all the files are placed at the root of the site.
But whenever I click on a particular blogpost, the css files are not correctly retrieved because of the folder structure. A blogpost is placed in a datefolder directory as you already know.
I cant explicitly include the css files as all the files are not loaded at once. They are loaded one at a time depending on the browser window size.
Please give me some directions about which way to go. Ask me if you need more details.
You could use the base tag to define the base URL for all linking attributes, e.g. href, src
<head>
<base href="http://www.site.com" />
</head>
Even if this does not work exactly as intended in loading your CSS dynamically, you could use jQuery to pull the base tag's href value out to prepend the CSS file location.
You can of course make the href value editable via the CMS if required.
What's the easiest way to integrate one html page into another? I am working on my personal website, and I have a template that I'm editing. Now I found a free resume html code that I can use, but when I try to add it to my website everything is messed up! The two CSS style files are not compatible with one another, and I honestly have no clue on what to do. I tried copying some of the styling from one CSS file to the other, but the result is just not what I want.
You could try nesting the HTML resume on it's own page and just embed it on whatever page you wish using an iframe element.
I am learning CSS and want to customize an pre-existing out-of-box cookie cutter CSS style web site provided by my vendor.
Is there a way I can remove an css file which was linked in the head tag so I can strip-out/unstyle the entire page easily?
I was reading posts regarding reset.css, Normalize.css & CSS refactoring tool, not sure if they are the right tools. Any suggestions are highly appreciated.
I suggest installing Firebug if you use Firefox so you can easily see the different stylesheets and what purpose they serve. From there just remove the <link rel="stylesheet" href="filename.css"> element that has the styles your trying to strip and start over. Create your own file and re-insert it into the <head> of said site.
By your question this is all I can imagine you want to accomplish -- forgive me if I misinterpreted you ..
Here is the link to download firebug: https://getfirebug.com/downloads
Just remove the tag in the section, and the CSS should no longer be there, providing that all of the CSS was in fact in the CSS files and not inline.
if i have a single CSS stylesheet for a website and only want to declare it once, that is, not use the following code on every aspx page..
<link href="stylesheets/general.css" rel="stylesheet" type="text/css" />
Am i forced to use a .master page? or is there another way to do this..
in addition to what was mentioned above, use an ASP.Net theme with the CSS in it. The master page will have the css file included automatically.
http://odetocode.com/articles/423.aspx
Master pages are you best bet here. I would guess that once you get that in there, before long you'll find lots of other great things to put in there, too.
There are other solutions, but they're not as easy (e.g. subclass page and inject scripts).
You can use a base page that all your pages inherit from and load it in that. Other than that there's probably a way of doing something by hooking into the pipeline. (Example of this last approach here https://web.archive.org/web/20211029043851/https://www.4guysfromrolla.com/articles/120308-1.aspx)