Forums / Templates, Stylesheets, Page Layout / learn to edit css & php?

learn to edit css & php?

Locked

Views: 2,691

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
24 Apr 2009, 3:26 PM
#1
graham35 avatar

graham35

New Zenner

Join Date:
Apr 2009
Posts:
14
Plugin Contributions:
0

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

24 Apr 2009, 3:47 PM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

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/

The learning is in the doing.

Potent Products

24 Apr 2009, 5:04 PM
#3
graham35 avatar

graham35

New Zenner

Join Date:
Apr 2009
Posts:
14
Plugin Contributions:
0

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

24 Apr 2009, 5:36 PM
#4
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

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.

The learning is in the doing.

Potent Products

24 Apr 2009, 5:38 PM
#5
graham35 avatar

graham35

New Zenner

Join Date:
Apr 2009
Posts:
14
Plugin Contributions:
0

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

24 Apr 2009, 5:43 PM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

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.

The learning is in the doing.

Potent Products

24 Apr 2009, 6:51 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

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

 //define('SITE_TAGLINE', 'The Art of E-commerce'); 

change it to:

 //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

25 Apr 2009, 2:50 AM
#8
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: learn to edit css & php?

afo:

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

//define('SITE_TAGLINE', 'The Art of E-commerce');

> 
> change it to:
> ```
 //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

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Apr 2009, 3:53 AM
#9
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: learn to edit css & php?

:oops: 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. :no:

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

25 Apr 2009, 4:07 AM
#10
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: learn to edit css & php?

afo:

:oops: 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. :no:

Thanks for catching my mistake, Clyde!

Actually, "tagline" is in two files meta_tags.php and header.php

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Jul 2009, 4:01 PM
#11
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: learn to edit css & php?

I have report W3C Markup Validation Service
Errors found while checking this document as XHTML 1.0 Transitional!

Line 1, Column 1: character "" not allowed in prolog

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E Whare in ZC is file to edit HTML? Byte-Order Mark found in UTF-8 File. The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported. Hay to edit UTF-8 (BOM) in UTF-8?