Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

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?
Avatar of Happy Tohelp
Happy Tohelp
Flag of United States of America image

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...
SOLUTION
Avatar of Happy Tohelp
Happy Tohelp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

T
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

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?