#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0

    A bit of css help


    Hey all I'm having a little trouble with 2 divs I have trying to stretch out on different resolutions

    simply they're set up as a banner and a red divider the site is set around 800x600 on rvsitebuilder and I'm trying to get those 2 divs to fit as the template does when on a bigger screen so far it just remains either too short or too long

    heres the code for the CSS for those images and divs

    #red_bar { margin: 10px auto 0px; overflow: hidden; padding: 20px; min-width: 800px; max-width: 1260px; position: absolute; } #nzpbanner { margin: 10px auto 0px; overflow: hidden; padding: 20px; min-width: 800px; max-width: 1260px; position: absolute; }
    any help would be appreciated as I'm still a novice on this
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    44
    Rep Power
    2
    Replace all min/max width properties with simply "width" if there is no reason that these elements would change dimension.

    I'm not totally sure of what you're asking. Are you trying to have to banners sit next to each other and equal the width of the page?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0
    Its more I want the images to fit on the page on any resolution without being too long or short for the page
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    44
    Rep Power
    2
    Originally Posted by SSTG
    Its more I want the images to fit on the page on any resolution without being too long or short for the page
    Images are going to be whatever resolution they were created at it. The bigger you make them the more the quality will diminish. If you're talking about scaling HTML/CSS styled banners, you could use width percentages instead of pixels so that they take up all available horizontal space. Although including padding and margins for different containers, you may not exactly what you were looking for. Close enough may cut it though, try it out.

IMN logo majestic logo threadwatch logo seochat tools logo