Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 04-25-2012, 04:36 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-21-10
Posts: 82
iTrader: 0 / 0%
Images in a sub-directory path ?

I have my @import in my code, a HTTP request is showing that my images are not being loaded because the images sub-directory is located within my css sub-directory, which it isn't. I tried many relative ways to make it work so those images load, no success.
 
Reply With Quote
  #2 (permalink)  
Old 04-25-2012, 05:05 PM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,113
iTrader: 4 / 100%
A copy of one of your image screen tags might be helpful to those trying to help you. Relative paths can be confusing.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
  #3 (permalink)  
Old 04-25-2012, 05:44 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-21-10
Posts: 82
iTrader: 0 / 0%
When the CSS was embedded, there was no problems. When I made it an external style sheet, that's when it begun.

<style type="text/css">@import url("/csnew/css/<filename>.css");</style>

One of the images HTTP request.
http://<site.com>/csnew/css/images/header_graphic.png
 
Reply With Quote
  #4 (permalink)  
Old 04-26-2012, 06:04 AM
Contributing Member
Latest Blog:
None

 
Join Date: 05-21-10
Posts: 82
iTrader: 0 / 0%
The relative path is looking within the /css sub-directory for /images. The /images sub-directory lives on it's own within a parent directory. I can't figure out to solve, arrghh.
 
Reply With Quote
  #5 (permalink)  
Old 04-26-2012, 06:27 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,113
iTrader: 4 / 100%
First that is not a relative path. That is a full URL image tag.

A relative path would look like this
Quote:
./images/header_graphic.png
For background image the full URL is required so you just need to modify the the CSS file to read:
Quote:
http://<site.com>/csnew/images/header_graphic.png
That will work if the the images are in a folder named images and images is a sub directory of csnews.

This page may also offer additional tips to help you: http://www.w3.org/TR/CSS21/cascade.html
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
  #6 (permalink)  
Old 04-26-2012, 07:10 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-21-10
Posts: 82
iTrader: 0 / 0%
Thanks for the tip
 
Reply With Quote
  #7 (permalink)  
Old 07-17-2012, 04:29 AM
Member
Latest Blog:
None

 
Join Date: 07-12-12
Posts: 38
iTrader: 0 / 0%
Well, it doesnt matter if u even place your image directory in css folder or even in any folder,

and even you can use images put on another site or server.

All i can say that you might be using some code mistake.

i would say that you should first open the document in dreamwear, then click on the desired image and point it to the right one as you want, now dreamweaver will make to path correct after that you can specify that path to all images in your css file.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the best way to do Clipping Path for your images? webinventa Graphic Design Forum 4 04-26-2011 04:48 AM
Why my images not showing though they are on the server and with rght path? sash_007 Coding Forum 4 03-01-2010 06:21 PM
WTS: Funny Pictures And Images Collection - Over 5000 Images F15 Content 6 01-26-2010 02:46 PM
What type of images and royalty free images do developers and webmasters need? EZRoyaltyFree Web Design Lobby 0 02-26-2008 08:11 AM
Images Directory Limit Coding Forum 1 01-20-2004 10:10 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:10 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.