1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

A real basic question.. browser compatibility in CSS

Discussion in 'CSS' started by sami1255, Sep 14, 2008.

  1. #1
    okay heres a component in my css.. when i adjust its top:15px; with respect to IE.. Its position is changed in firefox and chrome.. and when adjust it with firefox.. chrome and IE shows it dislocated..

    HOW TO MAKE IT ALL BROWSER COMPATIBLE
     
    sami1255, Sep 14, 2008 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    It depends. Showing only a part of the CSS isn't showing anything. Need to see the complete markup or a link and which version of IE you are talking about. All versions of IE work different than each other. Otherwise, it's all a guess.

    One thing that is not a guess: do not rely on anything IE does as being correct. It is 10 years behind web standards or wrong in its implementation.
     
    drhowarddrfine, Sep 14, 2008 IP
    sami1255 likes this.
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Moving things with position: relative is generally a bad idea. However, if you MUST do it, know that you are not moving the box at all-- you are moving the visual representation of the box (so, the box is still in the old place and you just moved the picture of it). Where it goes is in relation to where the box is in the first place. The box may not be in the same place in all browsers to begin with.

    A better way to move things is to use margins instead. margin-top, margin-left. Although this works on blocks, and I think #search would be a form which is a block but I dunno without seeing code.

    Follow doc's advice-- check in IE, but don't use it as a guide. There are a few rare times where IE is right and everyone else is wrong, but 99% of the time everyone else is right and IE is wrong.

    IE does sometimes deal with positioning strangely.

    Chrome, remember, is a beta browser. I suggest you download Safari-for-windows for Webkit rendering testing.
     
    Stomme poes, Sep 15, 2008 IP
  4. A-L_E-X

    A-L_E-X Peon

    Messages:
    557
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    use absolute position to place it wherever you want
     
    A-L_E-X, Sep 15, 2008 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    While it may have specific uses, in general that is a particularly bad idea.

    gary
     
    kk5st, Sep 15, 2008 IP
  6. rahildeziner

    rahildeziner Banned

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Send me the full files than i will try to help u...
     
    rahildeziner, Sep 15, 2008 IP