Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2008
    Posts
    150
    Plugin Contributions
    0

    Default Creating breaks between category names in navCatTabs

    I'm using category tabs on top of the page instead of categories listed in the side columns. This works great except for one little detail. The list breaks some of my multi word category names if they are at the end of the header. So, for example, a category called "Posters and Artwork" or "Sheet Music" might look something like this:

    xxother categoriesxxxxxxx Posters
    and Artwork xxxxxxxxxxx Sheet
    Music

    One quick fix I found is to actually include the the <br> tag in the category name where I want the break as I define the names in the admin. But that leaves me with a HTML tag coming up in places where I don't want it (like a category dropdown menu should I want to add one). So though I get the result I want at first, I suspect this is a sloppy fix for the long.

    I know the output of the category tabs is created by my tpl_modules_categories_tabs.php which I have in includes/templates/CUSTOM/templates

    How can I tell the code not to break the category names which have more than one word?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Creating breaks between category names in navCatTabs

    Post a link to this - as I could not get this to happen
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2008
    Posts
    150
    Plugin Contributions
    0

    Default Re: Creating breaks between category names in navCatTabs

    Quote Originally Posted by kobra View Post
    Post a link to this - as I could not get this to happen
    Hi kobra,

    You can see it happening on one of the links here: http://vinylfrontier.com/shop/

    I thought about getting around it by adjusting the padding or margins in the tabs neighborhood via the stylesheet. That way I can avoid getting into the php.

    I was able to split the text in my tagline, and even alter the font sizes to make the top line bigger by altering the header php. But the navTabs are a bit trickier.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Creating breaks between category names in navCatTabs

    Using FireFox and the web dev tools - I can interactively view and edit the stylesheet.

    I replaced yours with a default classic stylesheet from the Zen Cart distro 1.3.8a then adjusted the body text size to .75em and the mainWrapper width to 850px to replicate your site.

    After doing this there is no issue - So this must be in your stylesheet somewhere.

    I would merge your alterations one by one into an updated stylesheet to get your images colors etc transferred over

    But this is missing from yours and corrects this also missing from others as you have seperated these that were ganged so you may have issues with others

    Code:
    #navCatTabs ul li a {
    	text-decoration: none;
    	padding: 0em 0.4em 0em 0.4em;
    	margin: 0em;
    	color: #FFFFFF;  
    	font-weight: bold;
            white-space: nowrap;
    	}
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Apr 2008
    Posts
    150
    Plugin Contributions
    0

    Default Re: Creating breaks between category names in navCatTabs

    Quote Originally Posted by kobra View Post
    Code:
    #navCatTabs ul li a {
    	text-decoration: none;
    	padding: 0em 0.4em 0em 0.4em;
    	margin: 0em;
    	color: #FFFFFF;  
    	font-weight: bold;
            white-space: nowrap;
    	}

    kobra,

    Thanks! The nowrap was exactly what was missing. I must have accidentally deleted it early on.
    I have the Dev tool, and I'll run through the current stock stylesheet too.

    Again, many thanks!

 

 

Similar Threads

  1. Rustic theme, add image between categories in navCatTabs?
    By JayMot in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Sep 2010, 11:04 AM
  2. Removing category names from navCatTabs
    By annav in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Aug 2009, 10:12 AM
  3. Order Confirmation - how do I add line breaks between attributes?
    By SammyD in forum Managing Customers and Orders
    Replies: 13
    Last Post: 19 May 2008, 10:30 AM
  4. Increase space between navCatTabs in top navigation bar?
    By efghijk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Jul 2007, 03:01 AM
  5. NavCattabs vs. category box
    By studeo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Jan 2007, 04:51 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