Can someone help me problem solve?

Discussion in 'Web Design and Development' started by djsound, Feb 28, 2011.

  1. djsound macrumors 6502a

    djsound

    Joined:
    Dec 4, 2006
    #1
    www.burningreel.ca

    The header is using a template ...and i made a php page for once you enter your email for the newsletter....but once you click submit the fonts in the main menu and top right get bigger....they shouldn't because they are taken directly from the template...can anyone help as to why? thanks in advance
     
  2. my.(life)' macrumors newbie

    Joined:
    Aug 12, 2008
    #2
    CSS inheritance

    The last line of the first rule in style.css seems to be one of the culprits.

    Code:
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, img {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	outline: 0;
    	[B]font-size: 100%;[/B]
    }
    If you change the value of font-size the fonts on the page adjust accordingly... except for the page you go to after clicking on Submit, where the Main Menu and Contact Info font size stay constant no matter how much you fiddle with that value.

    Somewhere that font-size rule is being altered by another rule. Unfortunately there are so many levels of nesting in the HTML markup and unused selectors and rules in the .css files that I cannot even begin to guess at where that is happening.

    My only suggestion is to make a new stylesheet with only the rules the page is using and then comment them out one by one, until you find the offender.
     
  3. djsound, Mar 1, 2011
    Last edited: Mar 1, 2011

    djsound thread starter macrumors 6502a

    djsound

    Joined:
    Dec 4, 2006
    #3
    Ya its weird because I copied the code directly from a html page that worked fine and pasted it into the php file. I guess I can try and use Dust Me Selectors and get rid of unused css ....but it never seems to work to great for me.

    Its made so that when the user clicks submit it shows that but I guess I could make it so that when they click submit they could go directly tot he html page that worked?
     
  4. trucdem44 macrumors newbie

    Joined:
    Mar 10, 2011
    #4
    You can also try the tool at Unused-CSS.com. It'll check a bunch of pages and let you download the CSS files with just the used selectors.
     
  5. djsound thread starter macrumors 6502a

    djsound

    Joined:
    Dec 4, 2006
    #5
    That site looks very cool. I was under the impression I could try it out on one page but when I click download it says I need to pay $12? If it work I'll be paying for sure...but I want to try it first..
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    Don't bother. The Google Chrome developer tools tell you which CSS rules are unused and that is free (in the Audits section if you are interested).
     

Share This Page