This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
including css in Django
I have not much experience with web-front.
I'm trying to integrate a forum app into django. ( http://www.pybbm.org )
I succeeded running the app(I can see the forum at http://localhost/forum/ )
But it looks horrible without any css.
I tried including all the css files and less files I find in www.pybbm.org but it doesn't seem to help to make it look better.
Can anyone take a look at where the css files are for the site?
the abreviation of CSS is Cascading StyleSheet, so it is responsible for the lay-out of the website. A css file is likely stored in a directory called CSS or style or sometimes in the main directory.
What you could do to find the css file is opening the index.html file and search for a file with extension .css. You can find the line of text at the head of the index.html file.
When you found the .css file, you also see where it is saved, like /main/style/style.css
Problem solved?
Related
This question already has answers here:
Multiple webpages with common title and navigation bars
(4 answers)
Closed 2 years ago.
I would like to start a homepage for me. Every time I add a thing to index.html I have to add it to the links (in about.html etc.) as well.
How can I simplify that, that the new things of the index.html are automatically transferred directly into the other links (about.html etc.)?
Thanks for the help
The solution I used was to create a JS script that you would include in your HTML, that would add the HTML you want to the document :
let body = document.getElementsByTagName("body")[0];
body.insertAdjacentHTML("beforeend", "your html");
You could then put this script where you want to include the HTML.
I don't know if it's the best solution, but it works.
Right now, using vanilla HTML, there is no quick, easy, and simple way to do this. Using a backend framework like Django, this is easy, but that is really complicated and takes a while to learn!
This question already has answers here:
Referencing a .css file in github repo as stylesheet in a .html file
(5 answers)
Closed 3 years ago.
I've tried to upload my custom CSS file to apply to https://soundoffmusic.com/
I've got the raw CSS file with this file path
https://raw.githubusercontent.com/themomoravi/SoundOff-Website/master/styles.css
and I've tried using this as my href since it points directly to the raw CSS file:
href="https://raw.githubusercontent.com/themomoravi/SoundOff-Website/master/styles.css">
Still it has not worked. I've also tried the abbreviated versions of this such as styles.css, SoundOff-Website/styles.css, etc. (as my href).
I'm wondering why else github pages might not be rendering my custom CSS.
Please advise and thanks so much in advance.
If you are serving your website from a GitHub repository using GitHub pages (which I assume you are doing, judging by the raw link you provided), you can (and should) reference your assets in a relative way, such as
<link rel="stylesheet" href="./styles.css">
in your index.html's <head>.
Linking directly to GitHub raw storage can cause problems as it is not designed as a CDN and everything is always returned with a plain/text header. There used to be a service that provided a solid bridge between a client and raw GH storage, but it's been shut down and GitHub pages work just as well now.
This question already has answers here:
Is there an HTML/CSS/JS editor that immediately shows changes? [closed]
(6 answers)
Closed 6 years ago.
I have been learning HTML + CSS via online courses like codeacademy and W3schools. I have a very simple grasp as to creating webpages and I want to play in a "sandbox" by creating pages and just messing with stuff.
I'm looking for somewhere I can type in my HTML and CSS and have it display on a webpage just like any other page I look at. I haven't been able to find anything quiet like that, other than the courses themselves. Is there even such a thing?
You could try JSFiddle
It accepts JS, HTML, CSS and renders it realtime...
You can download a coding software such as Brackets. Save your html file as index.html and your css as styles.css (per example) in the same folder.
Simply click on them in your computer's documents and it should work, opening in your default browser. You don't need an "online" tool for html/css.
Also check out this blog post for alternatives
I would highly recommend http://codepen.io. I find it the most user friendly of the bunch
I think JsFiddle would work for what you want. It also allows you to incorporate javascript as you begin to branch out. Plunker is also something I would recommend as it has a "live preview" where your page will automatically display as changes are made.
Get a free website from a site like 000webhost. Then, you can upload and edit code in real time on the server and view it on eg. http://example.freehost.com and you can view it real time. Also you could use software like notepad++ and edit your code before uploading it. Make sure your homepage is index.html
This question already has answers here:
Using relative URL in CSS file, what location is it relative to?
(7 answers)
Closed 8 years ago.
I've been learning Web Design from W3schools. Recently, I started CSS. For background image, it's example is: background-image: url("Paper.gif")
My question is: Where does it even find this image? It's not like "url" is an actual URL, and Paper.gif seems to just come out of nowhere. Is it saved in the same file as the CSS file?
Since you ONLY supplied a filename, the browser looks to load Paper.gif from the same directory which the file is served from. It's commonly referred to as a "relative path."
For example, if you load http://example.com/index.html and that page references a background-image: url(background.png), it will look for http://example.com/background.png to load.
This is, of course, assuming you're not using an external stylesheet. If so, your relative path will load from the place that the stylesheet is served from. For example, if you load http://example.com/index.html, which references http://example2.com/style.css for its styling, and that stylesheet references a file named background.png, the browser will look for a file at http://example2.com/background.png
The example above is telling the browser the image is at the root of your website. However say if the image is like so background-image: url("images/Paper.gif") then it's telling the browser the image is in the images folder. Hope that was clear :)
Anyway... this is the best HTML & CSS book for beginners: http://www.htmlandcssbook.com/
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
is there any limit on css file size?
I have a generated CSS file coming from a third party application of around 60K lines with ~ 13K classes defined in that. I cannot change the generated CSS file by any means on the server (when it is generated from the third-party application) and the way it is injected in different HTML files on GET requests.
My target browser for the application is IE9 and it so happens that IE9 is failing to parse more than 4095 classes coming from one file and hence doesn't get the classes defined after that. Also, this number has been exact while debugging the generated file I have and another test file which I created (gist below) to verify this number.
Is there any workaround possible or am I missing any detail here ?
Illustration:
To give a quick way to reproduce this problem, here is a link to a gist that I have created. Just extract all the files in some folder and open ie9_test.html in IE9
https://gist.github.com/3941331
I couldn't find any service to show the output online where an IE9 environment is present. My IE9 build is 9.0.8112.16421
EDIT: The test files and my files work fine on chrome v22
Well one obvious workaround would be to break it up yourself into two or more files. You could then include both on the relvant pages. You would just have to write a simple css parser to identify where to cut up the file. And by simple I mean just find where classes start and begin so you know where to chop chop.