Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3

Thread: Layout/CSS Help

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    9
    Member #
    4216
    Hi, I'm new here. Just found this site two days ago and spent quite a bit of time since then reading through the forums. I've been unable to find what I'm though.

    So here's my prob.

    I'm redesigning my website (www.eyecravedvd.com) and am attempting to place everything centered in a 768px wide table.

    I want to place my logo superimposed on top of the table using the

    Code:
    style="position:absolute
    and defining the paramaters, but if someone with a screen res larger than 800x600 visits the site, the logo won't be where I want it to be. Does anyone know how I can work around this or define it so that it will always be with the table, which will always be the same size?

    Thanks,

    Shane
    www.eyecravedvd.com

  2.  

  3. #2
    Senior Member ceetee's Avatar
    Join Date
    Jul 2003
    Posts
    117
    Member #
    2035
    You can only do what you want with javascript. The boxWidth is the width of your outer container - the table or whatever. I haven't tried this script but it should work.

    <script type="text/javascript">
    if(boxWidth<screen.availWidth)
    {
    offset=(screen.availWidth -boxWidth)/2;

    cssStatement="<style type='text/css'>#outerBox\{position:absolute;left:"+offset+"p x\}</style>";
    document.write(cssStatement);
    }
    </script>

  4. #3
    Junior Member
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    9
    Member #
    4216
    I solved it a different way. Thanks for your advice. Much appreciated.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:52 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com