• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

Why will this background image not show up?

Head out to http://www.myqardboard.com/qr/index.php?id=2 - Perfect.

Same site, exact same code, go out to http://www.myqardboard.com/2 - background image doesn't show up. Everything else in terms of formatting looks good, but the background image won't show up.

Stylesheet is at http://www.myqardboard.com/qr/stylesheet.css

I'm so stumped. If the htaccess was incorrect, I would expect everything to be messed up. If the stylesheet was flawed, I shouldn't be able to see everything on the first site.

What do you think? What am I missing? Why can't I get the background image to show up when the URL is myqardboard.com/2?
3 Solutions
Which image is missing?  I see they render differently, but it looks like the page turn image is loading at a fixed width on the site http://www.myqardboard.com/2 and also coloring the background grey.

Not sure why though...
Here is something...the background and #div#profile_background arent getting the same css even though they look tagged the same.  

See screenshots.
Oh, I think I see the issue.  You have a stylesheet in the qr directory that isnt the same as the one in the root.  Try putting the qr one in the root folder.  Or link to the one in qr from the  http://www.myqardboard.com/2 page.  Right now it's loading stylesheet.css instead of ../qr/stylesheet.css

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Alexandre SimõesManager / Technology SpecialistCommented:
You're missing this class in the stylesheet.css.
#profile_background {

Open in new window

You have it in the qr/stylesheet.css that's why it shows correctly there.
<link href="stylesheet.css" rel="stylesheet" type="text/css">

<link href="qr/stylesheet.css" rel="stylesheet" type="text/css">
brucegustPHP DeveloperAuthor Commented:
This morning I attended the weekly Rotary meeting. If you're a part of that, you know that every morning they go around and they ask "What's your good news?"

My good news was the fact that I had been wrestling with a web related problem that I could not figure out, but thanks to the guys at experts-exchange, I was able to figure it out!

Thank you so much! It's amazing to me how sometimes the most seemingly difficult scenarios are resolved by a solution that is pretty easy. But I'm not kicking myself too hard. I've tried I don't know how many alternatives / options to try and figure this out.

I'm going to go ahead and award points accordingly, but if you don't mind, I want to try and explain WHY this was occurring.

The fact that I was redirecting my web traffic using an htaccess dynamic necessitated being "absolute" in the way that I referred to my stylesheet. Reason being is that while my user was being redirected to the qr folder, the page itself was still operating as though it were situated in the root directory. And that's not a flaw, that is simply the dynamic you need to be sensitive to as a developer in that kind of situation.

So, going forward, should I attempt something like this again, the bottom line is to be prepared by specifying that css file with an absolute url and not a relative one if you're needing something beyond what's documented in the stylesheet positioned in the root directory.

Is that accurate?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now