Thread: aligning in IE

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    24
    Rep Power
    0
    Hi,

    I just finished doing a photo gallery (http://www.djriyad.com/matrix/gallery4.phtml?galid=5)and it does not center correctly in IE, it works fine in both browsers(4.0+) but the images are not aligned properly in IE (they are in netscape). I am not sure why but taking out the position:absolute from the style sheet makes it render correctly in IE but this reference is necessary so i can not omit it and maintain the desired look...

    Any help would be appreciated.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    114
    Rep Power
    15
    I've faced similar problems with positioning. I think it may have to do with netscape's margins, but things positioned in one browser, don't always look right in the other. Try this.

    Use your favorite code to detect the client's browser, so...

    if (IE)
    {
    document.write("<style><!--#thing_to_position{position:absolute;top:50px;left:50px;}--></style>")
    } else {
    document.write("<style><!--#thing_to_position{position:absolute;top:40px;left:40px;}--></style>")
    }

    <img id="thing_to_position" src="some.gif">
    The browser's will love you for positioning things according to their needs...


    [This message has been edited by billyo (edited July 02, 2000).]

Similar Threads

  1. Memory aligning a struct
    By bramp in forum C Programming
    Replies: 3
    Last Post: September 17th, 2003, 07:47 AM
  2. Trouble aligning caption text in graphical command buttons!!!
    By cnoakes in forum Visual Basic Programming
    Replies: 1
    Last Post: August 20th, 2003, 04:04 PM
  3. vertically aligning a form inside a table?
    By pixalone in forum HTML Programming
    Replies: 1
    Last Post: August 5th, 2003, 05:04 AM
  4. top aligning an iframe within a td
    By stevenal in forum HTML Programming
    Replies: 3
    Last Post: July 16th, 2003, 04:39 AM
  5. Image is not aligning correctly.
    By Sauhnik in forum HTML Programming
    Replies: 1
    Last Post: July 10th, 2003, 04:56 PM

IMN logo majestic logo threadwatch logo seochat tools logo