Results 1 to 7 of 7
  1. #1

    changing with browser size

    I have a simple (i think) question:

    How do you make like the width of your website change according to the browser window size?

    For example, I'm trying to do a styly sheet for my website, and I want the website name up top, and I made this divider graphic that I want to extend the whole width of the page.

    Anyone know how I could do this? Seems to me like it would be pretty simple, but I can't find out how anywhere.

    Its kinda like how the title space of these forums extends the entire width of your browser no matter what size you make it

    thanks

  2. #2
    There are 2 ways to do this:

    1. Code a script in java that will detect the users resolution and then displays the right page for his resolution. Not too many people are fans of this method.

    2. You can use tables and write sizes in % and not in pixels (Ex: width = "100%"). This method works fine, but it is not easy job to make everything go in the right place, only harder, not imposible.

    You can size images in % cause they won't look good.

  3. #3
    Join Date
    Apr 2004
    Location
    London, UK
    Posts
    8
    Can somebody say which method is used with the name at the top of this forum please.

  4. #4
    Originally posted by VoiceMan
    Can somebody say which method is used with the name at the top of this forum please.
    using tables with width=100%

  5. #5
    To go into further detail. Take for example this site, as you said. You can see here http://www.webhostingtalk.com/whtimages/logo2.gif

    The logo is an a table, the table has a background of probably a 1x30 pixel image, and essentially it is just stretched 100%.. if that makes any sense to you. So, you don't have to make like, If then statements and make images of all different sizes. Just to let you know, because it is a hard concept to grasp actually, but, once you get it, it is quite powerful, and looks very nice.

  6. #6
    Join Date
    Apr 2004
    Location
    London, UK
    Posts
    8
    Yeah, I think I can get my head around the concept. I suppose the downside would be that stretched images might not look so good?

    And do tables follow the same rules with all browsers or just IE?

  7. #7
    They all follow the same rules, some are more strict than others, however you shouldn't run into any problems. And yes, that actually is a downside, but with a little image tweaking.. or a lot heh, you can actually make it look quite flawless. It does take time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •