Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2009
    Posts
    14
    Plugin Contributions
    0

    Default learn to edit css & php?

    Hi.
    I am trying to edit some templates for my shop site,

    when I edit my php and css codes with notepad++ , things like tagline and other things I want to do away with, how much of the code should I remove, should I remove the whole line (or lines) if its relevant to just the tagline or do I leave some of the code in and just remove 'Tagline' from the abbreviations and leave the rest of the code. I am not sure how far to go in removing codes.......

    Your help would be appreciate,

    attached jpeg

    PS...... where is the best website to learn a bit more about coding, css and php, which would be useful for me working on my shop site. ta
    Attached Images Attached Images  

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: learn to edit css & php

    <div id="tagline" << this is a Declaration

    Which is matched to the same Declaration within your CSS file.

    #tagline {
    color:#000000;
    font-size: 2em;
    text-align : center;
    vertical-align: middle;
    }

    Within the Declaration you have properties and values.

    color:#000000

    All properties "must" have a value.


    Commenting out is how you stop something from showing or being used within a CSS file.

    Comments within a CSS file start with /* and ends with */ - anything in between is ignored.

    To comment out an entire declaration:

    /*
    #tagline {
    color:#000000;
    font-size: 2em;
    text-align : center;
    vertical-align: middle;
    }
    */


    To comment out a property / value:

    #tagline {
    /* color:#000000; */ << this color setting is now ignored
    font-size: 2em;
    text-align : center;
    vertical-align: middle;
    }

    Also, using display:none is a property / value combination that prevents the Declaration from being shown. You can read more about it and most other HTML / CSS related tutorials at http://w3schools.com/

  3. #3
    Join Date
    Apr 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: learn to edit css & php

    Thanks Rob

    So in my image that I attached, would I do this

    <div id="taglineWrapper">
    /*<div id="tagline">*/
    Your logo could be wider here, Sales Header Text Could Be here, Or a Banner Image, or any combination of the three; find instructions in the readme.txt, which you have read already, right?</div>
    (should I leave a space or drop a line into the coding)
    or would I have used display:none and if so where would I have put it in this situation.

    This is the info you were using, was this just as an example or would I be looking for this in the coding.
    #tagline {
    color:#000000;
    font-size: 2em;
    text-align : center;
    vertical-align: middle;
    }

    and where does <div id="taglineWrapper"> come into it (from my image) should I be doing something with this.

    Thanks Rob, I will look at the website you provided me with later this evening.

    I have coloured my text red, to define my adjustment for this conversation.
    Cheers
    Graham
    Last edited by Graham35; 24 Apr 2009 at 06:10 PM.

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: learn to edit css & php

    As mentioned in my earlier post, the /* and */ are to be used only in a CSS file.

    <div id="taglineWrapper"> is HTML output and would be editted in another file.

    For learning more about working with Zen Cart best to use the Tutorial/FAQ link, top of this page, for more info on what you want to do.

  5. #5
    Join Date
    Apr 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: learn to edit css & php

    I have been playing around with this coding and realise that its HTML, as I cannot find it using firefox and the web development tool.

    Does this change how I would adjust things, it seem that the templates are built using php. css. and html ................... I think

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: learn to edit css & php

    PHP and CSS files are used to create the HTML pages.

    As you learn more about Zen Cart you will see that sometimes, one HTML page is created from more than one PHP file.

  7. #7
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: learn to edit css & php

    Exactly what are you trying to do?

    If you don't want a tagline, copy includes/languages/english.php into includes/languages/YOUR_TEMPLATE (where YOUR_TEMPLATE is the name of your custom template). Open includes/languages/YOUR_TEMPLATE/english.php with a good text editor like Notepad++ or Crimson Editor (both free downloads).

    Around Line 11 find

    Code:
     //define('SITE_TAGLINE', 'The Art of E-commerce');
    change it to:
    Code:
     //define('SITE_TAGLINE', '');
    (NOTE: the two single quotes remain)

    Save the file and FTP it to the correct folder on your website.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  8. #8
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: learn to edit css & php

    Quote Originally Posted by afo View Post
    Exactly what are you trying to do?

    If you don't want a tagline, copy includes/languages/english.php into includes/languages/YOUR_TEMPLATE (where YOUR_TEMPLATE is the name of your custom template). Open includes/languages/YOUR_TEMPLATE/english.php with a good text editor like Notepad++ or Crimson Editor (both free downloads).

    Around Line 11 find

    Code:
     //define('SITE_TAGLINE', 'The Art of E-commerce');
    change it to:
    Code:
     //define('SITE_TAGLINE', '');
    (NOTE: the two single quotes remain)

    Save the file and FTP it to the correct folder on your website.
    That declaration has been moved from english.php (that why its commented out.

    The file you want to edit is

    includes/languages/english/header.php

  9. #9
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: learn to edit css & php

    I found that with developer's tool kit, but didn't notice the statements were commented out! That's what I get for doing that at work.

    Thanks for catching my mistake, Clyde!
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  10. #10
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: learn to edit css & php

    Quote Originally Posted by afo View Post
    I found that with developer's tool kit, but didn't notice the statements were commented out! That's what I get for doing that at work.

    Thanks for catching my mistake, Clyde!
    Actually, "tagline" is in two files meta_tags.php and header.php

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. products_with_attributes_stock.php?action=edit&products_id=114&attributes=19&q=1
    By Kontaktwear in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 31 Aug 2012, 03:02 PM
  2. What is the best way to learn PHP? And/or CSS?
    By CultureClick in forum General Questions
    Replies: 5
    Last Post: 1 Jul 2012, 02:30 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