Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-08-2012, 07:12 PM   PM User | #1
sambar89
New Coder

 
Join Date: Dec 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
sambar89 is an unknown quantity at this point
CSS background image (index.php)

Basically i'll try and keep this short...

I had an index.html file with the css rule (I'm using JQuery mobile)

Code:
.ui-page {

background-image:url(image.png);
}
Everything worked fine. The image displayed perfectly.

But know i've handed over the code to my group so they could implement some extra functionality and the index.html file is now index.php

Now the image is not working.. but all other styling is. I've looked for solutions online but drawn a blank. Is there something i should be aware of here, when using php files?

Thanks
sambar89 is offline   Reply With Quote
Old 05-08-2012, 08:09 PM   PM User | #2
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 293
Thanks: 0
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
It may be that the image is not in the same directory as the php. So the image either needs to be moved or it needs to have the path added in the css.
__________________
100% standards compliant code is 100% correct 100% of the time.
one of my toys from my repository and perhaps some help getting help

Cd&
COBOLdinosaur is offline   Reply With Quote
Old 05-08-2012, 08:57 PM   PM User | #3
sambar89
New Coder

 
Join Date: Dec 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
sambar89 is an unknown quantity at this point
It's in the same folder.. well it was originally in an images folder in the same directory but i've tried moving the image into the same folder but still no luck
sambar89 is offline   Reply With Quote
Old 05-09-2012, 06:17 PM   PM User | #4
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 293
Thanks: 0
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
php should not have anything to do with it. It just generates the text of the page. the problem is either the browser or the server is not sending it. Are there any error messages in the console?
__________________
100% standards compliant code is 100% correct 100% of the time.
one of my toys from my repository and perhaps some help getting help

Cd&
COBOLdinosaur is offline   Reply With Quote
Old 05-09-2012, 06:40 PM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello sambar89,
Like COBOLdinosaur suggests, check your path. Have you tried using an absolute path yet? Just to verify the image will load that way.

absolute/relative paths
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:50 AM.


Advertisement
Log in to turn off these ads.