SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: IE6 and Mozila

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile IE6 and Mozila

    i am using float left for a div containing a jpeg . in ie6 there is a space between the div and the one above it in mozila and ie7 it is ok-there is no space. how can i cancel the space in IE6 ?
    when i use position:relative; it affects the Mozila to so i cant use it.

  2. #2
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fix height of divider horizontal in IE

    Quote Originally Posted by gertila View Post
    i am using float left for a div containing a jpeg . in ie6 there is a space between the div and the one above it in mozila and ie7 it is ok-there is no space. how can i cancel the space in IE6 ?
    when i use position:relative; it affects the Mozila to so i cant use it.
    Ok, I think I know where your going. For the sake of argument you have a two div's and you want a horizontal divider between the two.

    #horizdiv { height:1px; background-color:#CCC; }

    <div>content 1</div>
    <div id=horizdiv></div>
    <div>content 2</div>

    This will look great in Firefox, but in IE the horizontal div will default to about 30px high rather than the 1px height that you defined in the style.

    To Fix this issue use :

    #horizdiv { height:1px; background-color:#CCC; line-height:0px; }

    <div>content 1</div>
    <div id=horizdiv>&nbsp;</div>
    <div>content 2</div>

    With those two additions, you should get a 1px high grey divider that looks right in both FF and IE 6+
    intragenesis, llc professional web & graphic design


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
  •