Forums / Templates, Stylesheets, Page Layout / CSS Weirdness (Padding Issue - I think)

CSS Weirdness (Padding Issue - I think)

Locked

Started by howser on 11 May 2006, 3:11 AM · Views: 5,135

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
11 May 2006, 3:11 AM
#1
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

CSS Weirdness (Padding Issue - I think)

Hi everyone,
I'm having a wierd issue with one box on my site. I've gone through the tutorials and still have a problem that I think is attributed to css, at least somewhere. If you look at my site: http://www.jelcards.com and see the area around the left column Categories it has white space all around it. The right side doesn't have that whitespace, although I made the settings the same (I think) for both. I'd like to have it look like one continuous line both in size and color. The size works well for IE, but can be off on Firefox.

Two questions:

  1. How do I fix the whitespace? I want it to go away.

  2. How can I ensure that the line across (left, center, right) is the same size in all browsers?

Thanks! BTW -- below is some of the relvant code from my stylesheet.


/sideboxes/
.columnLeft {
margin: 0em;
padding: 0em;
}

h3.leftBoxHeading, h3.leftBoxHeading a {
font-size: 1em;
color: #ffffff;
}

.leftBoxContainer {
margin: 0em;
}
.rightBoxContainer {
margin: 0em;
}
.leftBoxHeading, .centerBoxHeading {
margin: 0em;
background-color: #996666;
background: url(../images/grad1.gif);
background-repeat: repeat-x;
padding: 0.5em 0em;
color: #ffffff;
}

.sideBoxContent {
background-color: #ffffff;
padding: 0.4em;
}

h3.rightBoxHeading, h3.rightBoxHeading a {
font-size: 1em;
color: #ffffff;
}

.rightBoxHeading {
margin: 0em;
background-color: #996666;
background: url(../images/grad1.gif);
background-repeat: repeat-x;
padding: 0.5em 0em;
}

h3.leftBoxHeading a:hover {
color: #eedfcc;
font-size: 1em;
text-decoration: none;
}

h3.rightBoxHeading a:hover {
color: #eedfcc;
font-size: 1em;
text-decoration: none;
}

.rightBoxContent {
background-color: #ffffff;
margin-bottom: 1em;
}

11 May 2006, 3:21 AM
#2
yesterda avatar

yesterda

New Zenner

Join Date:
May 2006
Posts:
4
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

um, im learning too, so I cant help ya, but maybe you can help me... How did you change the New Products For May Title Background Color? I can't find it in the css... thx

11 May 2006, 3:43 AM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,717
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

.leftBoxContainer {
border: 1px solid #ffffff; <<<< remove this
margin-top: 1.5em;
}

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

12 May 2006, 1:12 AM
#4
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

Kim:

.leftBoxContainer {
border: 1px solid #ffffff; <<<< remove this
margin-top: 1.5em;
}

Thanks -- but if you look at the .css above, I don't have that line, I have:

.leftBoxContainer {
margin: 0em;
}

Any other ideas?

12 May 2006, 1:13 AM
#5
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

yesterda:

um, im learning too, so I cant help ya, but maybe you can help me... How did you change the New Products For May Title Background Color? I can't find it in the css... thx

Here's the part that does that:

.leftBoxHeading, .centerBoxHeading {
margin: 0em;
background-color: #996666;
background: url(../images/grad1.gif); <-- This is a 1px by 25px gradient that I made
background-repeat: repeat-x; <-- This command repeats that gradient.
padding: 0.5em 0em;
color: #ffffff;
}

12 May 2006, 6:41 PM
#6
gkrynen avatar

gkrynen

New Zenner

Join Date:
Jul 2005
Location:
Lancaster CA
Posts:
63
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

Kim:

.leftBoxContainer {
border: 1px solid #ffffff; <<<< remove this
margin-top: 1.5em;
}

Thanks Kim, this helped me to remove the 1 pixel border and the top margin so the column aligns correctly using Firefox.

However in IE it still has the border and additional space between header and lower columns. Any ideas?

Greg Krynen

www.krynen.com - Interesting answers
www.PurpleDragonGifts.com - Jewelry and other gifts
www.PurpleDragonTraders.com - Beads

all of life is 50/50

13 May 2006, 1:00 AM
#7
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

Any other ideas, since my css code is very simple for the left box container and is the same as the right box container, wouldn't it stand to reason that they would behave the same?

13 May 2006, 2:50 AM
#8
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

My problem was solved not by removing this line:

border: 1px solid #ffffff

For one, I never had it in, but instead I changed it from 1px to 0px and that fixed it. I don't really know why I needed it, but either way, problem solved. Hopefully that helps someone in the future!

13 May 2006, 7:50 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: CSS Weirdness (Padding Issue - I think)

If defining the border to 0px solved the problem, that means that somewhere before that statement there is another border definition that was being expressed until you overrode it. (It could even be in another stylesheet which is loaded before the one you edited, for some setups.)

I found this in your stylesheet.css, at 1/4 from the top of the file:

/sideboxes/
.columnLeft {}

h3.leftBoxHeading, h3.leftBoxHeading a {
font-size: 1em;
color: #ffffff;
}

.leftBoxHeading, .centerBoxHeading {
margin: 0em;
background-color: #FF6699;
padding: 0.5em 0.2em;
}

.leftBoxContainer {
border: 1px solid #ffffff; <------------HERE
margin-top: 1.5em;
}

Then the one you put in at 1/5 from the bottom of the file:

h3.leftBoxHeading, h3.leftBoxHeading a {
font-size: 1em;
color: #ffffff;
}

.leftBoxContainer {
margin: 0em;
border: 0px solid #ffffff
}

You are overriding both margin and border definitions; it would be cleaner to edit the first instance and not have the second.

13 May 2006, 9:09 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: CSS Weirdness (Padding Issue - I think)

howser, gjh42 is 99% right. What you have done is make a copy of stylesheet.css called stylesheet_jel.css but also left a copy of stylesheet.css in your template directory.

This means that any deletions from stylesheet_jel.css will have zero effect as your store still picks up the original styling from stylesheet.css. That's why you had to override rather than delete the border settings to make them work. The very easy answer to this is simply to delete the unneeded stylesheet.css (there will still be an unused copy in template_default should you ever want to go back).

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

18 May 2006, 3:58 AM
#11
howser avatar

howser

New Zenner

Join Date:
Jan 2005
Posts:
10
Plugin Contributions:
0

Re: CSS Weirdness (Padding Issue - I think)

Perfect, thanks for all the replies. I cleaned up the code and also cleaned up the directory as well. Appreciate everyone who answered!