Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

urls in the content property

Featured Replies

I need to define an image in a stylesheet.

 

Here is a snippet of the HTML:

<div class = 'systemLogo'></div>

 

and here is a snippet of the stylesheet:

 

.systemLogo
{
margin-left: 200px;
margin-bottom: 20px;
width: 780px;
}

.systemLogo:before 
{ 
content: url(http://localhost:8080/qtiv2/images/JAssess.gif); 
}

 

This works fine, but is not portable.

 

If my stylesheet code is:

 

.systemLogo:before 
{ 
content: url(images/JAssess.gif); 
}

 

This does not work, even though the <head> tag of the HTML is:

 

<base href='http://localhost:8080/qtiv2/' />

 

In other words, the base href is not being added to the url for the image.

 

Perhaps this is something which CSS cannot do: but it is a nuisance if one wishes to write portable CSS

 

Any ideas, anyone?

the base reference is only a reference for files linked directly from the html file, it's effect does not apply to any other external filetypes such as php or css.

 

So you'll have to use ../

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.