SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Liquid Layout JS & CSS / Prob on Safari

    This liquid layout works on pc but on a mac it completely splits as if the javascript isn't being read, but only in safari, it is fine in firefox and i don't know about ie mac but don't care.

    I seem to remember someone telling me macs read javascript slightly differently, could this be the reason?

    Here are the main css statement which control the widths hope one of you guys can point us in the right direction:

    -------------------------------------------------

    .pageContainer{
    min-width: 800px; max-width: 905px;
    width:expression(document.body.clientWidth < 800 ? "800px" : document.body.clientWidth > 905 ? "905px" : "auto");
    }

    -------------------------------------------------

    .mainContent{
    padding: 0px 20px 10px 17px;
    min-width: 480px; max-width: 645px;
    width:expression(document.body.clientWidth < 800 ? "480px" : document.body.clientWidth > 905 ? "645px" : document.body.clientWidth - 260);
    }

    .adsContainer{ width: 120px; min-width: 120px; max-width: 120px;}

    -------------------------------------------------

    .mainContentNoAds{
    padding: 0px 0px 10px 17px;
    min-width: 660px; max-width: 765px;
    width:expression(document.body.clientWidth < 800 ? "660px" : document.body.clientWidth > 905 ? "765px" : document.body.clientWidth - 140);
    }

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code you listed has one thing in common, the expression statement. This is (well supposed to be, but I'm curious as to why firefox works with it) an IE only deal. "Liquid layout" as it where, generally deals with using percentages to declare width, instead of absolute pixels.


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
  •