Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jul 2011
    Location
    Darlington, UK
    Posts
    23
    Plugin Contributions
    0

    Default Trouble with css images

    Hi - I am a total novice in this but need to get this website going and move on...

    I've changed product images via cpanel and uploadedmenu, header images via cpanel inot the images folder, i've changed many elements in css. But for some reason I can't seem to properly route that header image in CSS stylesheet. I can;t replace the original Zencart header and can't replace the body background colour with a background image, which isanother thing I need to do.
    (I've checked the cpanel is pointing at the right custom template)
    I am working in a customised version of Zencart contemporary Green.

    http://www.sugar-mouse.co.uk/

    Here's the header code...


    #headerWrapper{
    background-image: url(file:///C|/Users/Cliffecm/AppData/Local/images/boardzen.jpg);
    background-repeat: repeat-x;
    background-color: #ffffcc;
    height:180px;
    }

    Thanks in anticipation - I just can;t figure out what I'm doing wrong.!!!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: The Quickest and Easiest way to work out what does what on the CSS style sheet

    Code:
    url(file:///C|/Users/Cliffecm/AppData/Local/images/boardzen.jpg)
    This is the path to a file on your home pc, not the web server location.
    Code:
    url(../images/boardzen.jpg)
    is the right way to point to an image in /includes/templates/your_template/images/.


    Your stylesheet has an error right at the top:
    Code:
    body {
    
    	background-color:#FFFFCC;
    
    	#logoWrapper{
    
    	background-image: url(file:///C|/Users/Cliffecm/AppData/Local/images/menuboard1.jpg);
    
    
    
    	}
    
    
    
    	;
    
    	background-repeat:repeat;
    
    	background-attachment:fixed;
    
    	margin: 0;
    
    	font-family: verdana, arial, helvetica, sans-serif;
    
    	font-size: 62.5%;
    
    	color: #00000;
    
    	background-color: #FFCCCC;	}
    The #logoWrapper should not be inside the body {} rule.
    Last edited by gjh42; 8 Jul 2011 at 03:14 PM.

  3. #3
    Join Date
    Jul 2011
    Location
    Darlington, UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Trouble with css images

    Hi there - thanks very much for your time and trouble.

    I've changed the bad script at the top but am trying to change the header script to point to the images folder on the server.

    I know this is fundamental, but how exactly do you do that? I've hit browse and of course wrongly chosen the image file stored on my computer, but I need to point that browse to the server and fetch the file I need from images.

    http://www.sugar-mouse.co.uk/ is the site for interest....

    thanks again,

    Cliff.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Trouble with css images

    Since this a template image, not a product image, you should save it in /includes/templates/your_template/images/.
    Then background-image: url(../images/boardzen.jpg); will find and use the correct image.

  5. #5
    Join Date
    Jul 2011
    Location
    Darlington, UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Trouble with css images

    Dear gjh42 - I'm really indebted for your taking this trouble with me...

    thanks for your reply... You know that's exactly where the image is and I've tried this path which you first suggested and it still isn't picking it up..

    when i then go back into the stylesheet the line is pointing again to the image on my computer.

    totally bamboozled now.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Trouble with css images

    I think part of your issue is that you are probaby trying to create a "page" in an external editor - possibly DreamWeaver, and then trying to apply that "page" to zencart.

    Interestingly... Zencart (like all CMS platforms) has NO PAGES...

    ... well... not in the sense that you may understand the idea of "web pages".

    Zencart "assembles" the pages "on-the-fly". They do not exist until they are "requested" by the person viewing the site. Depending on what the viewer selects, the assembly code (the PHP) goes about gathering up all the component bits for the requested page, and these "bits" come from many places - including data from the database, images from the images folders, and perhaps some pre-formatted HTML chunks from places like the define_pages folders.

    But essentially, there are no "pre-existing" pages. When a person clicks a link or a button, the page they are on "evaporates" forever, and a new page is assembled. Along the way, a CALCULATION may be performed, and some additional information may be written into the database for use later on (such as items in the shopping cart).

    Some pages comprise HUNDREDS of assembled elements - all cobbled together by the PHP code...

    You need to abandon "conventional" HTML protocols here... A CMS does not consist of "flat" html pages.
    20 years a Zencart User

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Trouble with css images

    Did you actually change the stylesheet rule to use background-image: url(../images/boardzen.jpg); ?
    Did the changed file correctly upload to the server?

  8. #8
    Join Date
    Jul 2011
    Location
    Darlington, UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Trouble with css images

    Thanks once again for your swift replies... I haven't actually got anywhere with loading my front page yet...that's a whole other problem!

    In answer to gjh, I have copied and pasted from your replies
    url(../images/boardzen.jpg). i upload it revised stylesheet to
    /public_html/sugar-mouse.co.uk/includes/templates/CUSTOM/css
    directly into my stylesheet and it overwrites thelast version. When i check the stylesheet afrer the process, it hasn't updated at all... should i rename the file altogether? I know in some programs like photoshop, when svess don;t seem to work, problems can be overcome by renaming the file.
    many thanks...
    Last edited by cliffecm; 11 Jul 2011 at 07:26 PM.

  9. #9
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Trouble with css images

    It sounds like you're having, perhaps, permissions problems on your server. Can you delete the stylesheet in that folder? Does it stay deleted? If not, contact your server folks and find out how to set things up so you have the necessary permissions.

    Rob

  10. #10
    Join Date
    Jul 2011
    Location
    Darlington, UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Trouble with css images

    Dear Rob,

    Thanks for the tip.

    That's what I'm going to do now Hopefully it will solve it. Watch this space...

    Cliff.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139d Trouble with CSS - Search Header Distorted
    By Keezee in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Jul 2013, 03:37 AM
  2. Trouble with category images
    By guscott in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Oct 2010, 11:47 PM
  3. Trouble with CSS in a New Sidebox
    By THE-EDL in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Dec 2009, 12:30 PM
  4. Trouble with CSS background images
    By Wilbo in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 13 May 2009, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg