Forums / Templates, Stylesheets, Page Layout / Only one file to change? Help I'm confusted

Only one file to change? Help I'm confusted

Locked

Views: 909

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 Aug 2008, 5:02 PM
#1
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Only one file to change? Help I'm confusted

Hello,
I'm trying to learn CSS at the same time while I'm changing the layout and colors of my website. I've already downloaded the developers tool for firefox and it helps. My question is, can all the changes for size and font color be done using that single css file /includes/templates/MYCUSTOM/css/stylesheet.css? or are there are other places that can also affect the change.

I get confused because some classes in the CSS file will overwrite some other ones and I'm not sure which class to change. For exaple, if I put the font size in

.sideBoxContent class

it will change the category font size, which is what I want. But then when I change the

.leftBoxContainer class

it will also change the size

So how do we know which one to change?

One final questions which attributes should we look at to do the change. When I use the developers tool it shows in the following order from top to bottom:

Attributes, Position, Other, Ancestors, Children so which one are we suppose to look at to do the changes?

Thanks for the help to try to understand this.

21 Aug 2008, 6:17 PM
#2
afo avatar

afo

Totally Zenned

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

Re: Only one file to change? Help I'm confusted

Yes, there's only one file to change, but you can have multiple stylesheets if you like.

What class to change depends on what you want to do. If I remember correctly, .leftBoxContainer is above .sideBoxContent, so if you change leftBoxContainer, more items may be effected than if you change .sideBoxContent.

Have you checked out http://www.w3schools.com/default.asp for info on working with CSS?

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

21 Aug 2008, 6:49 PM
#3
clydejones avatar

clydejones

Deceased

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

Re: Only one file to change? Help I'm confusted

CSS means cascading style sheet

so the structure for the side boxes would look like this:

#navColumnOne
#navColumnOneWrapper
.leftBoxContainer
.leftBoxHeading
.sideBoxContent

#navColumnTwo
#navColumnTwoWrapper
.rightBoxContainer
.rightBoxHeading
.sideBoxContent

This structure means that if you set the font-size at the
#navColumnOne, #navColumnTwo

That setting will cascade throughout the column (i.e. if the font-size is set at 10px in #navColumnOne, #navColumnTwo, then the entire column will have a font-size of 10px

You can change the cascade effect by changing the font-size at any point in the structure.

If as you indicate you want to change the font-size for only the content of one of the sideboxes then you need to add and extra definition to the structure,
for example to change the font-size for the categories sidebox, you would add a new declaration to the stylesheet #categoriesContent and change the font-size only for this declaration.

As AFO pointed out W3Schools is a great resource to use.

SitePoint also has a very good CSS reference section.

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