Referring Css and Bootstrap files - html

I have just started learning django and need some help. I have attached settings file with HTML code and its output. My HTML code is linking my css file. Am I linking it correctly or do I need to change something in settings.py file. Also I wasn't able to use bootstrap so I copied navbar example for W3school website and it ran fine. but when I replace the bootstrap link from the W3school to the one from bootstrap wesbite, it again doesn't work. And of course when I try to link downloaded bootstrap link, it doesn't work as well.
Please help me with this. I'm using django 3.1.enter image description here
Settings.py

Related

Why is my custom css file, which I have linked along with the bootstrap code, is not changing the page appearance or not working?

enter image description here
I am trying to create a website with bootstrap, but wanted to add some css of my own.
I have made a folder and have added my html file, not named index and in the same folder is my css file, and have linked it just after the CDN line of the bootstrap code, but the css file is not working due to some reason, and I can not figure out why.
Edit: So after I put the reference link just below the CDN line of the bootstrap code, of my own custom css. It should be working and my html should get updated, but I do not see the changes. Initially I thought it is because of the different folder, but even after putting it all into the same folder the webpage is not updating.
Try this:
<link href="~/FolderName/Petvrs.css" rel="stylesheet" />
Or drag and drop this css file inside HTML page it's must work.

Bootstrap CSS & JSP

hope you're doing fine.
I am currently stuck with my Web App project. This is the context: I would like to code a Web App using J2E. There's a free template that I liked and thus I decided to download it. When starting to use it I notice the CSS isn't applied.
Instead of having this, I have this:
However I do not see where the error is. The CSS & Bootstrap files should be visible in the JSP file and IntelliJ recognizes them. However I can't display these files (whether css or even pictures) that are referenced in "href".
Here's the project structure and code, maybe something's wrong there.
I'm used to HTML and to my understanding JSP isn't too different. Are the referencings different though?
Thanks in advance for any help you'll give,
Fares
YES.
Found the answer. Put resources in different folder than WEB-INF.
I believe that, your HTML file is inside the WEB-INF folder, for the to work either remove the WEB-INF path
<link href='style/stylesheet.css'>
or move your HTML one folder up.

Magento - Edit Product Page html not working

I'm trying to edit the HTML of product page from Magento but it's not working.
I followed some tutorials (example: How to edit product page template in Magento) but without success.
I'm editing the "view.phtml" from the path below (standard template):
/siteName/app/design/frontend/base/default/template/catalog/product
Edited code
HTML not updated
Any idea?
Thx.
This file call based on theme so please check your theme folder, the path of this file follow.
/siteName/app/design/frontend/[theme folder]/[theme child folder]/template/catalog/product/view.phtml
If you are using the RWD (responsive) theme you may possibly need to edit the template in that folder structure. It is new in 1.9.x

How to get bootstrap to work in Eclipse?

I am trying to get bootstrap to work with eclipse Dynamic Web Project (Helios). However when I run (Tomcat v7) on the server I get regular html. I think there must be an error with the link. I downloaded bootstrap and imported the file system in WebContent, there is a bootstrap folder (with css, img, js) inside WebContent.
I have tried:
"href="boostrap/css/bootstrap.css". "href="WebContent/boostrap/css/bootstrap.css". "href="css/bootstrap.css". "href=bootstrap.css".
I also copied the bootstrap folder outside of WebContent and tried all of the above. What's wrong?
The code I used is exactly (copied and pasted) the source from http://getbootstrap.com/examples/starter-template/#
with the href modified. I did not put it here because I'm getting weird formatting from StackOverflow.
Could it be that you spelled boostrap instead of bootstrap when using "href...?
I am getting the same problem. When I am using eclipse server to run webpage(using bootstrap) then it doesn't work.
But if i go to the webroot or webcontent folder and open the webpage then bootstrap works fine.
I hope you have downloaded jquery.min.js.

How can find the image path for css

I am new for for css and Bootstrap so sorry if silly question.
I want to use the Bootstrap in my project. I found a tutorial and going to follow. In the tutorial There is a folder and when I run the index.html file then you can see page with the logo.
I am trying to use the bootstrap and css in my project. I tried make same in my project with main.phtml
I run my file first and I could not see the logo(image) and I was thinking the problem is the path of .css file
The problem is when I put my html file in any directory rather than under main project(no any directory) I cannot see the logo.
Below first two screenshot is the tutorial file screenshots and the second two screenshot is the my file screenshots.
(I did not share any code because the css and html files are working)
Can someone explain to me why we cannot use the html files in directory or if yes how can we manage?
but when I try to add my project I cannot see the logo.
and the view;
EDIT
Please check here:
https://stackoverflow.com/a/20047417/6284581
you do not have to move your .html file
Your example css and img path not state correctly.
../ means one file directory up(check link above)! In your example if you start from
web... then you need to go main project directory. Try this
<link href="../web/static/styles/style.css" rel="stylesheet">
<a class="navbar-brand" href="#"><img src="../web/static/style/img/logo.png"></a>
I hope it will help to you