There was a site CSSJanus in Google Code used to flip direction from ltr to rtl.
At the bottom of the page, they said:
You could also embed this webapp directly in your markup with your publicly accessible CSS files like so:
<style>
#import "/do?file=www.yoursite.com/yourcss.css";
</style>
Can someone explain me how do I use it this way?
Sure, include the following in your HTML:
<style>
#import "http://cssjanus.commoner.com/do/?file=www.yoursite.com/yourcss.css";
</style>
I'd just put it below any other CSS files you include on the page.
Make sure to provide the absolute path to your CSS file (like in the example) and not a relative one (like css/style.css).
Related
I use a link in my html. How i can copy code of this file to edit it?
<link rel="stylesheet"href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
Do you really want to edit a minified file?
It can be done but it's difficult.
Instead, put that whole address minus the .min in your browser's address field
https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.css
and you should see the code unminified which you can then copy/save to your local system for editing. (on Windows this would be by right clicking the mouse/pad).
I am not sure whether you do want to actually edit this file, or whether you want to change some of its effects. If the latter you link to the file then put your own CSS in style element following and it will overwrite with whatever settings you have given.
You have to add your custom css style after it so it will overrite it.
In main html file you can just add styles right after <head> for example:
<head>
<link rel="stylesheet"href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
background-color: red;
}
</style>
So what happens now it imports bootstrap styles but after that overrides it so you can add your custom styles inside <style>
You can simply open the url - https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css
and save (ctrl+s) the file locally in your project and include the css file path with the help of this tag given below :-
You can also use custom css and then overide the css.
(Note :- Format the document/css file then you can edit the document)
I would like to understand where the div or ul CSS classes are defined.
For example I can see in my application code like this:
<ul class="carousel jcarousel-skin">
But when I search in all my application I can not able to find the declaration of class carousel jcarousel-skin
Can you help?
Well it is not a single declaration.
It is two classes applied (carousel and jcarousel-skin). Each could be anywhere in your css files, and they might not even exist as they might be used just for easy targeting from javascript.
You can use css style from external file by linking it to your html page or by html attribute "style" inside the html element.
There could be also a possibility that the CSS classes that you are looking for are referenced from remote location as CDN. You should look through css files which are linked as below:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
rel="stylesheet">
enter image description here
I added a navbar called stretchy-navigation to the website. It has a lot of css and less files. it introduces miner changes to the body. Removing header fixes things, but i need the header. by the way, i add my header and footer with jQuery with "load" function.
enter image description here
this is stretchy-navigation file structure.
Without seeing the code there are a few things you can try.
Force your body css instead of bootstraps with !important
font-size:1.6rem !important;
Add a class to your <body> tag like <body class='mybody'> And then have your css selector target body.mybody{font-size:1.6rem;} By making your css rule more specific it may take precedence.
The order of your linking css files might matter. Try putting bootstrap first and then your custom css code.
I'm trying to get the image in my C:\Images directory, I've seen css about background-image: url() but I can't find a directory based css for that or did I use the wrong css type?
Here's my css so far:
body
{
background-image: url('C:\Images\background.jpg');
background-repeat:repeat;
}
Don't use static paths in your CSS or HTML such as 'C:\Images\background.jpg' This makes your site non-portable and easy to break.
Always use relative paths when referencing the other files in the site. The browser knows how to resolve the path and requests the full path based on where the site is located.
I took my internal CSS and did a copy paste to an external CSS document and some of the formatting has gone away. I did not change anything from the internal to external and I know it is working because some of the formatting is working. Has anyone ran across this before and might have a answer to why this might happen?
Inline style override internal styles, internal styles override external styles. Most probably your styles are being overwritten...
I see the problem now, from the comment, Remove <style> and </style> from external css.
<style> attribute tells the browser that what follows next is style, but when using external stylesheets you do not need to put the <style> tag as you already tell the browser what it is when you import the file by using type and rel attributes.