Unable to utilize relative path in CSS

I currently have a CSS file located at /opt/ion/node/service/public. The file, cc.css, needs to be relocated to

/opt/ion/node/service/views/pages
. However, I am facing issues with this relocation process.

Whenever I hit the server, it continues to point to the public folder, causing my HTML files to not pick up the CSS file.

I need assistance in updating the file path for the CSS.

<link rel="stylesheet" type="text/css" href="cc.css" />

Since I am using the href attribute, it always directs to the public directory.

Answer №1

<link rel="stylesheet" type="text/css" href="../views/pages/cc.css" />

Is this the right answer?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Retrieve specific values from columns for dynamically generated rows using JavaScript

Currently, I am in the process of creating a dynamic table using PHP. In my screenshot, there are two rows with multiple columns. Each column in both rows has the same id. For example, the column for Monday has id="mon" in the first row and also id="mon" i ...

Is there a way I can get a number on my webpage to rapidly increase from 0 to 60 when the page loads?

I have a vision of incorporating a dynamic mileage counter that spins similar to the numbers on this website (scroll down a bit). It would count from zero to 60, or even start at 0 and go up to 100 before resetting back to 0 and counting up to 60 again, al ...

JavaScript condensed into a single table cell rather than occupying an entire webpage

Hey there, I have a simple question that I can't seem to find the answer to anywhere. I'm working on a JavaScript function that pulls data from my database and I want it to display in one cell of a table instead of outputting to the entire page. ...

When using Angular, automatically shift focus to the next input field by pressing the

I am faced with a challenge involving multiple editable inputs on my screen. Alongside these editable inputs, there are buttons and disabled inputs present. The current behavior is such that when I press Tab, the focus shifts to the HTML elements between ...

The on-screen keyboard using JQuery and CSS is not working properly on an HTML redesign

UPDATE - Check out the modified version here: https://codepen.io/anon/pen/wZQjQy Here is the original for reference: https://codepen.io/anon/pen/YMRLBN (had to utilize CodePen, as simply adding a snippet here doesn't link the CSS) I essentially copie ...

What are some other options besides object-fit?

Currently seeking a replacement for the css object-fit property that functions properly in Firefox and IE. While it works well in Chrome and Opera, it is not compatible with Firefox and IE. Experimented with the imgLiquid Plugin, but encountered issues w ...

How can these lines be drawn in a simple manner?

I have been using the div tag to create a line, but I'm looking for an easier solution. If you have another method in mind, please share it with me. #line{ background-color:black; height:1px; width:50px; margin-top:50px; margin-left:50px; f ...

How can I show the real-time coordinates in a small tooltip as the mouse moves over the map in openstreetmap/leaflet?

Is it possible to have real-time coordinates displayed as a tooltip when moving the mouse over a map? For example, displaying something like: 35.56, 56.765 I attempted to implement this feature on my Wix site using the code below. The map displays correct ...

JSOUP is cleverly filtering out specific tags while navigating through the HTML tree

While attempting to navigate the HTML tree of a Wikipedia page, I noticed that certain blocks of HTML elements in the code are being omitted. Is there a way to prevent these omissions? CODE Document doc = Jsoup.connect(url).timeout(10000).userAgent(USER_ ...

A method for generating CSS code from the structure of an HTML document

I am currently working on developing a recursive function that takes an HTML document tree and generates formatted CSS using only child operators (>), but I seem to be stuck. If you could provide some hints or ideas, I would greatly appreciate it. The ...

How can I remove the excess space from a column in Bootstrap 4?

I am facing an issue with excessive space in my navigation bar. I will provide the code below in hopes that someone can assist me in removing the extra space in my "col" elements. My goal is to have them positioned closer to one another. The biggest challe ...

What is the best way to utilize the bootstrap grid system for smaller screens while incorporating a table?

I have a PHP generated table that retrieves data and dynamically displays it in a table. It is crucial to ensure that the table data adjusts according to the screen size. Below is the code snippet: echo "<div class='container'><div cla ...

Issues with Bootstrap Input Group functionality

I am attempting to align multiple form elements in a row, however I am encountering some unusual behavior. My goal is to have the checkbox, label, number input, and select dropdown appear in the same line as shown in this image: https://i.sstatic.net/rARZ ...

The div containing the AJAX POST success message suddenly vanishes within moments of being uploaded

Encountering an issue following a successful AJAX post, where the updated div disappears shortly after Here are the jquery/PHP/POST data in sequence. Button On Click Function: function Delete_ID(clickBtnValue,clickBtnID,clickBtnName) { var my_data = {& ...

Restricting the amount of text within a span element

Can someone explain how to limit the display of characters in a tag using CSS, similar to the way YouTube truncates titles? I've searched through the styles but couldn't figure it out. Maybe they used JavaScript? Thanks! ...

Can I receive a PHP echo/response in Ajax without using the post method in Ajax?

Is it feasible to use Ajax for posting a form containing text and images through an HTML form, and receiving the response back via Ajax? Steps 1.) Include the form in HTML with a submit button. 2.) Submit the form to PHP, where it will process and upload ...

Creating an Online Photo Album with JavaScript

Looking for assistance to finish up my photo gallery project. I have created thumbnails that display 5 images at the top of my page, and below them is a div that should show the selected image in its original size when clicked. Can anyone guide me on what ...

"Adjusting the Width of Inner Content in a Div

Here is the structure of a div: <div id="showHide"> <div>Alarm</div> <div>Alarmasdf</div> <div>Alarmasdffasdff</div> How can I obtain the width of the largest content, such as "Alarmasdffasdff"? I hav ...

Dynamic jquery multiple select menu not refreshing properly

Welcome to the new year! I am currently working on creating a multiple select list with the attribute (data-native-menu="false"). The and elements are dynamically generated through a websql query. However, when I execute the code, none of the options are ...

Inject HTML content with headers using PDO in PHP

With the power of PHP PDO: I want to generate an HTML table (including thead and tbody) by querying a MySQL database using a select statement. This will be done dynamically, only requiring basic credentials and the name of the table. ...