CSS for IE7

Discussion in 'CSS' started by Ludus, Dec 10, 2008.

  1. #1
    I have a couple of problems with IE 7, ie I see the texts bigger than I see them on IE6 and FF and an image is not in the right position.

    I have already made some changes for IE 6.

    So, I put in the header:

    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="ie7.css" media="screen" /><![endif]-->
    Code (markup):
    But nothing change...

    Then, I write these classes:

    #header h2 {
            margin: 0 0 25px 26px;
    	padding: 0;
    	color: #86C666;
    	font: 1.2em Georgia, serif !important;
            font: 1.4em Georgia, serif;
            font: 1em Georgia, serif; /* IE 7.0 */ 
    
    }
    Code (markup):
    Nothing as above...

    Suggestion? :)
     
    Ludus, Dec 10, 2008 IP
  2. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    body
    {
     font-size:12px;
    }
    
    Code (markup):
    Define the font-size for the entire site. You are using font not font-size.
     
    LeetPCUser, Dec 10, 2008 IP
  3. Ludus

    Ludus Active Member

    Messages:
    105
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    95
    #3
    Thanks, but still nothing change...
     
    Ludus, Dec 11, 2008 IP
  4. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Every browser renders fonts slightly differently. I usually add a few pixels to containers and stuff so that it won't mess up any layouts rather than specifying browser specific font sizes. Could you post a link to your site? Maybe another way could be used to keep the image where it should be.
     
    rikun, Dec 11, 2008 IP
  5. Ludus

    Ludus Active Member

    Messages:
    105
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    95
    #5
    I solved, thanks to all. I put in the ie7.css a font-size on body.
     
    Ludus, Dec 12, 2008 IP