SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css layout relative to f/size b/ground image

    hi guys

    complete novice here, so please bear with me

    i've created a single page (so far) that has a full size bg image at 1024x768 which works ok as far as i can tell at 800x600

    http://tinysticks.com

    my problem is: at resolutions bigger than the above i lose the copyright notice into the black backround in firefox & netscape, in ie i also lose the intro box

    would someone be kind enough to point me in the right direction as to keeping control of these elements relative to the size of the background image

    cheers

    nick

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,476
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    It looks as though you are asking for max-width routine. Unfortunately ie doesn't do max-width so will have to either change your design or use a script to control it.

    You could use an expression as follows (although its not valid css).


    Code:
    <style type="text/css">
    body {max-width:1000px;}/* for mozilla etc*/
    </style>
    <!--[if gte IE 5]>
    <style type="text/css">
    #wrapper{width:expression((document.body.clientWidth > 1000)?"1000":"auto")}
    </style>
    <![endif]-->
    Then wrap a wrapper around your page as follows.
    Code:
    <body>
    <div id="wrapper"> 
    ........page content goes here etc.......
     
     
    </div>
    </body>
    </html>
    Hope that's what you meant

  3. #3
    SitePoint Member
    Join Date
    May 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you paul


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
  •