Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Change HTML code

Posted on 2013-11-08
19
292 Views
Last Modified: 2013-11-08
Here is the current "template" code

.iosSlider .slider .item2 .inner { background-image: url(http://pimg.co/p/900x400/123321/fff/img.png); background-size: cover; }


I need to point this "url" line to root/images/index_page_mobile/Cover1.png

What should my code look like?

I changes it to /images/index_page_mobile/Cover1.png but it doe not load.
0
Comment
Question by:Nicholas_BlueStar
  • 9
  • 7
  • 2
  • +1
19 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39633655
Then the path must be wrong or the image doesn't exist.  What is the folder structure in relation to the root folder?
Is the images folder in the root of your website?
Note Linux OS is case sensitive
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39633671
Hi,
have you tried your full qualified url?
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633706
@Rainerj

meaning something like

www.domain.com/images/index_page_mobile/Cover1.png?

I am using a testing server right now (i.e. test.domain.com)

So if I use the full URL it will only work on the test site, right? Then when I put my site "live" I would have to go back in there and rewrite all those lines from test. to www. right?

I know that my case is correct.

I was thinking maybe I needed " " around it? Or something small like that?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Nicholas_BlueStar
ID: 39633721
folder structure

root (all my html pages)
images (folder)
index_page_mobile (folder)
Cover 1.png
0
 
LVL 58

Expert Comment

by:Gary
ID: 39633734
"" is not needed unless there is a space in the url.
If you give the real url we could test it.

So does Cover 1.png have a space or is it Cover1.png - you pasted the name with a space.
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633755
sorry. It is cover1.png (no space)

current URL

test.bluestarbussales.com/index-2.html

It should be the first "slide" - it is currently just blank.

again here is the code that I have in the .js file

.iosSlider .slider .item1 .inner { background-image: images/index_mobile_page/Cover1.png; background-size: cover; }
0
 
LVL 58

Expert Comment

by:Gary
ID: 39633766
You need the leading / to say the path is from the root

.iosSlider .slider .item1 .inner { background-image: /images/index_mobile_page/Cover1.png; background-size: cover; }
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633783
okay I added the initial / before images

still loading a blank image
0
 
LVL 58

Expert Comment

by:Gary
ID: 39633824
Have you uploaded this to the server because I am not seeing the image name anywhere.
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633846
Yes

I am connected with an FTP program just to verify.

The images are located under /images/index_mobile_page/

I have Cover1.png through Cover10.png images inside that folder...My FTP program can see those files on the test server.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39633882
I have no problem accessing the images directly but they do not exist in your CSS
All you have is

.iosSlider .slider .item1 .inner {
    background-size: cover;
}


etc...
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633905
weird...

Is it something with Dreamweaver not uploading the .css file correctly?

Do you have a suggestion to "override" this?

I am looking at the css file in dreamweaver right now and it does have the location of those images in the code
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39633971
Hi,
just to add:
I get a 404 for the file "/css/lesssgrid.css"
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39633997
so what does that mean?

Is dreamweaver known to have issues uploading all the files?

Im just curious what is making some of these files not to be put when I sync the local with the test server?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39633998
Just move it over manually - drag n drop into your ftp client in your css folder.

This is the file dc_ios.css
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39634038
the leading slash refers to the current dirctory you nee to refer to the root with

../images/index_mobile_page/Cover1.png;

Cd&
0
 

Author Comment

by:Nicholas_BlueStar
ID: 39634040
manually updated the dc_ios.css file to the test server

still only seeing blank screens where the cover photos should be.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39634044
Found it, you have some typos - change these lines to this (Firefox was removing the css as it was invalid)
From line 15...
.iosSlider .slider .item1 .inner { background-image: url(/images/index_mobile_page/Cover1.png); background-size: cover; }
.iosSlider .slider .item2 .inner { background-image: url(/images/index_mobile_page/Cover2.png); background-size: cover; }
.iosSlider .slider .item3 .inner { background-image: url(/images/index_mobile_page/Cover3.png); background-size: cover; }
.iosSlider .slider .item4 .inner { background-image: url(/images/index_mobile_page/Cover4.png); background-size: cover; }
.iosSlider .slider .item5 .inner { background-image: url(/images/index_mobile_page/Cover5.png); background-size: cover; }

Open in new window

0
 

Author Comment

by:Nicholas_BlueStar
ID: 39634060
Gary - you rock! That solved the issue!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question