Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    help question Sidebox Heading Fonts--some are larger than others

    I have been having a problem getting all my sidebox headings to display correctly. The problem boxes are Manufacturers, Music Genres, Record Companies, Search, and Currencies. The headings for these boxes display in a larger font than the others.

    I have messed and messed with it, but can't come up with a good solution.

    The only difference I can see between the styling for those sidebox headings and all the others is that the LABEL element is applied to them. I am assuming that this is causing the problem.

    My first thought was to add .leftBoxHeading LABEL, .rightBoxHeading LABEL to this section in my stylesheet:

    .leftBoxHeading, .rightBoxHeading {
    font-size:1em;
    color: #000066;
    margin: 0em;
    background-color: #D7E4F5;
    padding: .5em .2em;
    line-height: 1em
    }
    That helped with the font size, but I still have a problem with padding (I think)--the heading text for those four sideboxes isn't sitting entirely inside the heading background like the other sidebox headings do.

    Advice?

    Also (because I can't help wanting to understand why), can someone explain why the LABEL element is applied to those four sidebox headings but none of the others? Is there something special about them? Would it hurt anything if I made override files for those sideboxes and just removed the LABEL element from the headings?

    Thanks

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

    Default Re: Sidebox Heading Fonts--some are larger than others

    The problem boxes are Manufacturers, Music Genres, Record Companies, Search, and Currencies. The headings for these boxes display in a larger font than the others.
    These are different ID's and can all be adjusted with the stylesheet.css
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Sidebox Heading Fonts--some are larger than others

    Kobra,

    Thanks for the reply.

    I should have said that I also was considering adding ids to the stylesheet for each of the problem boxes. I was sort of trying to avoid that because I thought it would be simpler to have all the sidebox headings changed from one place (.leftBoxHeading, .rightBoxHeading {}) since I want them all to be the same.

    I know I'm being sort of picky--its a personality thing

    Could the reason for those four box headings (Manufacturers, Music Genres, Record Companies, Search, and Currencies) having the LABEL element applied have something to do with those boxes having associated forms? --wild guess

    Sorry if my questions are tedious or stupid. I'm kind of new to Zen Cart, HTML, CSS, PHP, etc.--just trying to learn.

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

    Default Re: Sidebox Heading Fonts--some are larger than others

    Do a view source for the page where this is evident and then search/find the text for the header and you can determine the ID that is for this and adjust this (might have to add it) in the stylesheet.css
    i.e. - currencies is #currenciesHeading
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Sidebox Heading Fonts--some are larger than others

    Right. Perhaps I should just give up on understanding why and just be content with knowing how.

    I suppose I could add a set of id's to cover all the sidebox headings to accomplish the single place to change things, e.g.:

    #documentcategoriesHeading, #categoriesHeading, #whatsnewHeading, #manufacturersHeading, #reviewsHeading, #featuredHeading, #informationHeading, #moreinformationHeading, #bannerboxHeading, #ezpagesHeading, #musicgenresHeading, #recordcompaniesHeading, #bannerboxallHeading, #searchHeading, #bannerbox2Heading, #bestsellersHeading, #specialsHeading, #languagesHeading, #currenciesHeading, #whosonlineHeading {}

    I was just trying to get a better grasp of why using .leftBoxHeading, .rightBoxHeading{} doesn't do the same thing as the full set of ids

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Sidebox Heading Fonts--some are larger than others

    I was just trying to get a better grasp of why using .leftBoxHeading, .rightBoxHeading{} doesn't do the same thing as the full set of ids
    For reasons that are ???, if you look into the sidebox files you will see that some of these are specified in the code with a specific tag
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Sidebox Heading Fonts--some are larger than others

    Right. For example, manufacturers.php, line 61 has

    $title = '<label>' . BOX_HEADING_MANUFACTURERS . '</label>';

    I.e., the heading is enclosed in <label></label>

    The same is true in music_genres.php (line 38), record_companies.php (line 38), search.php (line 14), and currencies.php (line 38).

    What I can't figure out is, why is the label element used in these cases? Obviously I'm not too knowledgeable about HTML. My only guess so far is that it has something to do with the fact that those boxes have input forms.

    I did try removing the label element in manufacturers.php, and it seemed to fix the problem I was having, but I am worried that doing so might cause me other problems.

    I also tried adding ids for the box headings, but didn't fix the problem. Here's what I did:
    #documentcategoriesHeading, #categoriesHeading, #whatsnewHeading, #manufacturersHeading, #reviewsHeading, #featuredHeading, #informationHeading, #moreinformationHeading, #bannerboxHeading, #ezpagesHeading, #musicgenresHeading, #recordcompaniesHeading, #bannerboxallHeading, #searchHeading, #bannerbox2Heading, #bestsellersHeading, #specialsHeading, #languagesHeading, #currenciesHeading, #whosonlineHeading {
    font-size:1em;
    color: #000066;
    background-color: #D7E4F5;
    }

    The font still ended up larger for Manufacturers, Music Genres, Record Companies, Search, and Currencies than it was for all the other sidebox headings. That leaves me really confused, because I thought ids were supposed to have priority over elements and classes (because they are more specific). But, I suppose the Label element--though it is less specific--is actually closer to the text. In the Firefox DOM source viewer it looks like this:

    <h3 class="leftBoxHeading" id="manufacturersHeading"><label>Manufacturers</label></h3>

    Thanks for your answers. Any clarity you can offer helps.

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Sidebox Heading Fonts--some are larger than others

    Strange, this worked for me - -

    Did you try this at the very end of your css file? Try that and if this works then you need to search for each of these and concantenate the entries so that they do not conflict
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Sidebox Heading Fonts--some are larger than others

    Thanks. I'll give that a shot.

  10. #10
    Join Date
    Jul 2006
    Posts
    43
    Plugin Contributions
    0

    Idea or Suggestion Re: Sidebox Heading Fonts--some are larger than others

    I tried placing the ids at the end of the stylesheet. No help. I believe I have finally figured out the problem, though. Just in case someone else has the problem, I'll try to describe it to the best of my understanding. If anyone sees an error in this, please do correct.

    You can add id elements for sidebox headings to control their fonts, but because there is a set of LABEL tags inside of the h3 element for those 5 sideboxes which have input forms, some screwy things can happen. Here is what the HTML would look like for the manufacturers box heading:

    <h3 class="leftBoxHeading" id="manufacturersHeading><label>Manufacturers</label></h3>

    You may not have a problem if you create an id in your stylesheet like this:

    #manufacturersHeading {
    font-size: 1em;
    }

    But, if you change the font-size to 2em, you will likely have much larger font sizes for the sidebox headings with input forms than for all the others. This happens because ems are a relative measurement based on the parent item. Since the input form sideboxes (manufacturers, music genres, record companies, search, and currencies) have LABEL as the nearest element to the heading text, the em size for that text is calculated based on the LABEL element in your stylesheet rather than the h3 element (which is used as the basis for the rest of the sidebox headings).

    The best solution I could come up with is to remove the LABEL element from the two places in the stylesheet where it is declared generally (without classes, etc.). In template_default and classic stylesheets, these are the lines to be changed:

    LABEL, h4.optionName {
    and
    h4, h5, h6, LABEL, h4.optionName, LEGEND, ADDRESS, .sideBoxContent, .larger{

    changing them to this:

    h4.optionName {
    and
    h4, h5, h6, h4.optionName, LEGEND, ADDRESS, .sideBoxContent, .larger{

    avoids the problem because then no sizes are set for the LABEL element. Since the LABEL element has no characteristics defined, the em size is calculated on the next nearest item, which is the class .leftBoxHeading--thus it now has the same basis as all the other sidebox headings.

    I hope this makes sense and that someone else will be spared the headache. Thanks for your help on this kobra. Please let me know if you see any problems with this approach.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. some products are listed alphabetically and others are not
    By Dale Dugas in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 21 Feb 2010, 07:50 PM
  2. Hiding the sidebox heading fonts/links....
    By khopek in forum Templates, Stylesheets, Page Layout
    Replies: 28
    Last Post: 17 Jan 2010, 04:41 AM
  3. Fonts from HTML Editor, ALL Page Heading Fonts...
    By khopek in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Feb 2008, 02:08 AM
  4. One sidebox header bigger than the others
    By allthat in forum Basic Configuration
    Replies: 7
    Last Post: 26 Sep 2006, 04:15 AM
  5. Header Text is larger than the others
    By Dizzie in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Sep 2006, 03:35 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR