Yes, it’s relative to the .css
Here’s an example layout:
Page: page.htm ... does not matter where
CSS: /resources/css/styles.css
Image: /resources/images/image.jpg
CSS in styles.css
:
div { background-image: url('../images/image.jpg');
More Related Contents:
- Concatenate strings in Less
- How to draw this chart in html and CSS? [closed]
- Bootstrap NavBar with left, center or right aligned items
- How do I select an element based on the state of another element in the page with CSS?
- Bootstrap Center Vertical and Horizontal Alignment
- How to really isolate stylesheets in the Google Chrome extension?
- CSS background-image – What is the correct usage?
- What is the best way to clear the CSS style “float”?
- Hole in overlay with CSS
- Responsive CSS triangle with percents width
- Is it possible to use an input value attribute as a CSS selector?
- CSS3 transition on click using pure CSS
- Internet Explorer z-index bug?
- position: absolute without setting top/left/bottom/right?
- Z-index with before pseudo-element
- Select inputs and text inputs in HTML – Best way to make equal width?
- Float a div above page content
- Why does clip-path (and other properties) affect the stacking order (z-index) of elements later in DOM?
- Clip path inset circle?
- doesn’t inherit the font from
- What is the difference between :before and ::before?
- How to add a margin to a table row [duplicate]
- Clip/Crop background-image with CSS
- CSS negative z-index: what does it mean?
- How to make a Bootstrap 4 full width dropdown in Navbar?
- Why doesn’t my child element inherit color from its parent when parent has more specific selector?
- Stacking DIVs on top of each other?
- minmax fails (invalid property value)
- Div with cut out edges, border and transparent background
- Select specific element before other element