/    Sign up×
Community /Pin to ProfileBookmark

Can’t get the background-image to show.

I’m helping someone out with his CSS layout for a CMS (Joomla!). We’ve run into a snag that I can’t figure out so I thought I would bring it here.

He has installed a SEF extension which inserts <base href=”http://www.site.com” /> into his <head> tags. The problem is that this is causing a conflict for the url() value for the property background-image:

I was wondering how we can work around this. The base tag is setup and works fine for all the references with the HTML document. My first thought was that when I was trying to use relative paths within CSS for the image that it was referencing it from the <base> tag and not the location of the CSS file. So, I told him to reference it from the root. This didn’t work.

Next, I told him to use an absolute path to the image with url(). However, this didn’t work either.

I come to you and wonder if you can help out at all. Basically, we are trying to implement the “faux column” technique but the image isn’t being repeated for some reason.

I should state that when I remove the <base> tag entirely it works fine. Can anyone help here?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jul 21.2007 — A reference from the root should work with that base.
Copy linkTweet thisAlerts:
@zincoxideauthorJul 21.2007 — Unfortunately it does not work.

I have tried absolute and relative paths. I have also tried leaving the image in the same folder as the CSS file. As well as leaving it in the root folder and referencing it from there.

Nothing seems to work unless I remove the base tag. I need to figure out a way for the base tag to remain and still show the background image.
×

Success!

Help @zincoxide spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...