Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Hi all.

    Man, IE sometimes drives me up the wall! anyway...

    Ok, here is my problem. attached find a pic of a layout that I am designing. The problem is that in IE, there is whitespace above my <h2> tag. Once again...ONLY IN IE! Im in need of a hack to get rid of it.

    Here is the CSS that first defines the "left block". then an <h1>tag, <h2>tag and a <p>tag are all tags used exculsively in the left block. I need to get rid of that stupid space...
    Code:
    #leftBlock {
    background-image: url(images/leftBlock.gif);
    background-repeat: no-repeat;
    width: 162px;
    height: 408px;
    margin-left: 0px;
    margin-right: auto;}
    
    #leftBlock h1{
    color: #4f4f4f;
    text-decoration: underline;
    text-align: left;
    margin-bottom: auto;
    margin-left: 6px;
    margin-top: 0px;
    margin-right: auto;}
    
    #leftBlock h2{
    font-family: Tahoma, "Trebuchet MS", Arial;
    font-size: 0.7em;
    font-weight: bold;
    text-decoration: none;
    text-align: left;
    margin-left: 6px;
    margin-bottom: -18px;
    margin-top: 0px;}
    
    #leftBlock p{
    margin-left: 11px;
    margin-right: 13px;
    margin-top: 0px;}
    If needed I can post the html....
    Attached Images Attached Images

  2.  

  3. #2
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    Did you zero out the margins? I start most of my files with h1, h2, h3, h4, h5, h6, p, html, body, ul, li{margin: 0px; padding: 0px;} lately .. It's much easier to set it up once and not have to worry about it.. Then you just set the margin for each specific one as permitted..
    And if you want to 'talk' to just IE you do it like this

    * html h2{margin: 0px;}
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  4. #3
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    So if I want an ID selector thats IE specific I add a "*" in front of it? Is that what you are saying?

  5. #4
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    just put

    Code:
    * {
      maring: 0;
      padding: 0;
    }
    that will apply the margin: 0 and padding: 0 to all elements unless stated otherwise.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  6. #5
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    Oh that's cool.. <changing my code>

    Edit: And that works in all browsers?
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  7. #6
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    it should
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  8. #7
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    thanks for the help guys, but the problem still remains. I inserted your code Karinne. Then I tried this:
    Code:
    #leftBlock h2{
    font-family: Tahoma, "Trebuchet MS", Arial;
    font-size: 0.7em;
    font-weight: bold;
    text-decoration: none;
    text-align: left;
    margin-bottom: 0px;
    padding-bottom: 0px;
    margin-top: 0px;
    padding-top: 0px;
    }
    Now in Firefox there is no whitespace above the <h2> but there is whitespace below.

    In IE though, theres whitespace above and below! any pointers?

  9. #8
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    do you have this online? kinda have to see it... see what exactly it's doing
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  10. #9
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Hey Karinne, I actually changed the layout, so I dont use the <h2> tag anymore. Thanks for the help anyways. :classic:

  11. #10
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    oky doky
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com