SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Bath, U.K.
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question An XHTML template

    I know in a perfect world where IE did not exist this woul dbe less of an issue but...

    The company I work for are looking to move away from table based design to pure XHTML/CSS. The issue comes up that the company use a standard 5 column template for each site they produce (there's a heavy CMS behind the page) and 'hide' columns when they are not needed in site design.

    I've recommend the use of three xhtml templates, left col, right col and flanking cols (so different xhtml different CSS) but my boss is insisting on one XHTML template with 3 different CSS docs to reflect the three layouts.

    Which approach would the users of sitepoints recommend?

    Thanks in advance,

    Joe Leech
    --------------------------------------------
    www.josephleech.co.uk
    --------------------------------------------

  2. #2
    SitePoint Member planetx's Avatar
    Join Date
    Mar 2004
    Location
    Mississauga, Canada
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The ideal scenario would be a single script (ASP, PHP, etc) that generates one of the 3 layouts depending of the setting for the given page in the CMS that references a single CSS file. The CSS file would have selectors for all the types of layouts like: #col1or3 {...} #col1of1 {...} #col1of2 {...}, etc... From a code maintenance point of view, this is best. All your sites use a single script and a single CSS. When you need to update all your site, you just copy over 1 script.

    Not sure if this is what you were looking for but I hope it helps.

  3. #3
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Bath, U.K.
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by planetx
    The ideal scenario would be a single script (ASP, PHP, etc) that generates one of the 3 layouts depending of the setting for the given page in the CMS that references a single CSS file. The CSS file would have selectors for all the types of layouts like: #col1or3 {...} #col1of1 {...} #col1of2 {...}, etc... From a code maintenance point of view, this is best. All your sites use a single script and a single CSS. When you need to update all your site, you just copy over 1 script.

    Not sure if this is what you were looking for but I hope it helps.

    Yeah thats the conclusion I had come to. although my boss wants to get bandwidth right down so might try and use three CSS files. now comes the horrendous task of updating the CMS templates / code generators to make them compliant.

    thanks again,

    joe
    --------------------------------------------
    www.josephleech.co.uk
    --------------------------------------------

  4. #4
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could just use one file, and distinguish the layout using CSS selectors. On one page, use #threecols .left { } and on another #fourcols . left { }

    Wouldin't one CSS file use less bandwidth than three CSS files?

    You could use a float based solution with min-width, then you would only need one line of CSS for each column

    Douglas
    Hello World


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
  •