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 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    4
    Member #
    18137
    The center of my webpage is aligned to the center, and stays in the center as the browser is resized. I have two "sidebars" connected to the center that need to expand to the edges of the browser no matter where the center content is or where how wide the browser is. How would I go about doing this?

    Any help?

  2.  

  3. #2
    Senior Member diddy's Avatar
    Join Date
    Jun 2008
    Location
    Sydney, Australia
    Posts
    502
    Member #
    16955
    There was a recent thread with a similar problem. Try looking at this:
    http://www.webdesignforums.net/html_...age_31163.html

  4. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    4
    Member #
    18137
    Sorry for posting so late.

    Right now I've solved the problem by using a repeat-x on a small section and repeating it across the entire page background. The only problem with this is that it resizes very slowly. I'm assuming it's because it has to repeat and redraw the entire background with every change of the browser, even if I only need it to draw partially on the sides.

    Illustration:
    http://img293.imageshack.us/img293/1733/90141755so4.png

    I can't use percentages because the sidebar is not always a fixed percentage of the screen.

    Is just repeating it across the entire background, with the content covering up the parts of the bar in the middle that most efficient way, or is there some way to make the width of sidebar always snap to the center content using JavaScript?

    Edit: Hmmm... I've got most of it working using JavaScript and screen.width. My current problem is that the screen object only updates when the page is loaded, not dynamically. Is there any way to take the screen width every time the browser is resized through JavaScript?

    Thanks.

  5. #4
    Senior Member diddy's Avatar
    Join Date
    Jun 2008
    Location
    Sydney, Australia
    Posts
    502
    Member #
    16955
    Not sure about the javascript as I don't know that much of it but there probably is. Maybe someone with js expertise could figure something out?


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 09:05 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com