in

Managing CSS size and inheritance

Last post 10-18-2007 7:44 PM by andy.harris. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-18-2007 7:44 PM

    Managing CSS size and inheritance

    Whilst adjusting some CSS on the Gateway (HGA) to match mobile devices, I came across the following revelations.

      a) Padding get inherited sideways across a table, this isn't written anywhere but it causes cells in a table to be padded to whichever style has the greatest padding.

      b) There is a strong interaction between line-height, padding and margin, this can drive you round the bend if you have cell with mixed version of these in the table.  For mobile devices I've eliminated line-height from the definitions

      c) We use the TD element extensively, so this is the one to get all the default attributes on, then specify only the differences for classes that will inherit from TD.

    Have managed to reduce the CSS load from 25813 bytes to 11205 bytes.

     The next area of work is to reduce the size of the images that we serve up.  You'll notice that the PNGs can be quite large (26K+).  This is because they still have all the layers and objects held separately.  This is great if you want to resize and work on the images, but not so good if you're serving them to a mobile on a GRPS link.
     

Page 1 of 1 (1 items)
(c) WebBrick Systems