If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / CSS #categoriesContent

CSS #categoriesContent

Started by abcschooldr on 5 Jun 2012, 10:13 PM · Views: 955

Results 1 to 13 of 13
5 Jun 2012, 10:13 PM
#1
abcschooldr avatar

abcschooldr

New Zenner

Join Date:
Feb 2012
Posts:
77
Plugin Contributions:
0

CSS #categoriesContent

I am trying to separate categories in the left hand side box with divider lines. I added this to the bottom of my css stylesheet at:/includes/templates/classic/css/stylesheet.css.

#categoriesContent, .sideBoxContent {
	 border-bottom:solid black 1px;
	}

I now have a line at the bottom, but not all of the way through. I want to add more categories, and it is already confusing to tell the difference between them.
Attachment 10557

5 Jun 2012, 10:21 PM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

Posting Tips

If you're encountering display/layout problems, post your site URL* so it can be seen in action.

Screen shots do not help very much

you might also want to look at Categories Dressing in the Free Mods section

5 Jun 2012, 10:40 PM
#3
abcschooldr avatar

abcschooldr

New Zenner

Join Date:
Feb 2012
Posts:
77
Plugin Contributions:
0

Re: CSS #categoriesContent

http://www.abcrealestateschools.com/ABCOrderForm/

The category box on the left needs separations between categories. Is the Categories Dressing necessary? Can divider lines be created in css?

5 Jun 2012, 10:54 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

no not necessary but gives you more control over the look

here is the easy way - in:
/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php

find:
```
$content .= '<br />' . "\n";


change to:
     ```
 $content .= '<br /><hr />' . "\n";
5 Jun 2012, 10:58 PM
#5
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

then in admin>configuration>layout settings

find:
**Categories Separator between links Status

change to: "0"
**
this way you will not have double lines at end of categories if you opt to show new, specials, ect. links

5 Jun 2012, 11:15 PM
#6
abcschooldr avatar

abcschooldr

New Zenner

Join Date:
Feb 2012
Posts:
77
Plugin Contributions:
0

Re: CSS #categoriesContent

Wow!! It worked perfectly! :D

5 Jun 2012, 11:44 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

glad this worked for you :-)

6 Jun 2012, 12:51 AM
#8
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: CSS #categoriesContent

abcschooldr:

Can divider lines be created in css?

For my retail site (link in my sig below) this bit in the CSS puts in the dotted line under the category names in the left nav panel. (Click one of the categories in the top horizontal nav on the home page to see the side nav panel on all other pages.)

.sideBoxContent ul li {
    background: url("../images/li_underline.gif") repeat-x scroll left bottom transparent;
    padding: 2px 0 4px;
}

I'm not CSS savvy enough to invent that. It came with my template. I haven't tried it, but I assume that a border style could be used instead of the gif.

Rob

Breakfast: the most important donut of the day.

6 Jun 2012, 1:01 AM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: CSS #categoriesContent

The stock categories sidebox does not have the <ul><li>, but is simply inline <a> elements separated by <br /> to keep them on different lines. Very primitive, unchanged since 2003 (and probably pre-2000 in osC).

6 Jun 2012, 2:20 PM
#10
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

gjh42:

The stock categories sidebox does not have the <ul><li>, but is simply inline <a> elements separated by <br /> to keep them on different lines. Very primitive, unchanged since 2003 (and probably pre-2000 in osC).

hence the <hr />

6 Jun 2012, 3:19 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: CSS #categoriesContent

Yes, a nice simple hard-coded method. It's a reasonable way to do it if all you want is the divider.
You can actually get the same effect with just the stylesheet by making categories links display: block; and border-bottom: 1px solid #aabbcc;
That does require turning off category counts, though, as those are not part of the links.

6 Jun 2012, 3:42 PM
#12
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: CSS #categoriesContent

very true -

Just saying - depending on individual site circumstances, the easiest solution is sometimes the best solution. If anybody utilizes CSS (over utilizes), it's me :-)

I help where I can and my advice and/or suggestion are just that - ADVICE and/or SUGGESTIONS