SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question regarding absolute positioning and stretching to fit

    I layed out this site using absolute positioning for every image, and attempted to stretch the images on the end ot the edge of the browser window. The images stretch 2x past the edge of the browser and I am curious as to why?

    Do I need to create at least 2 "panes" for these images to reside in?

    http://www.3rdshift.org/vfmagic

    thanks for any help.

    Rich

  2. #2
    SitePoint Enthusiast wwright's Avatar
    Join Date
    Nov 2002
    Location
    Florida
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I too am having the exact same problem and cannot figure out why? If I find out I'll let you know.

    Later, wwright

  3. #3
    SitePoint Enthusiast wwright's Avatar
    Join Date
    Nov 2002
    Location
    Florida
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know if this will help but I made two images one is the navigation tabs and the other I call the filler. Now the navigation image is set to the left at 0,0 px with a width of 50%, The filler is set to x:50%; and width:50% so that adds up to 100% thus it cover the entire screen and NO scroll bar at the bottom. So I juess any combination of % would work as long as they =100% and don't overlap. Here is my css for reference... The only thing I have yet to figure out is how to get the images to resize when the browser window resizes???
    See it in action Here
    =====================================

    body {

    margin-left:0px ;
    margin-right: 0px ;
    background: #ffffff;
    padding:0px;

    }


    #navigation {

    position:absolute;
    top:0px ;
    left: 0px ;
    width: 50% ;
    height: 59px ;
    background: url(navbar.gif);

    }

    #filler {

    position:absolute;
    top:0px;
    left:50%;
    width:50%;
    height:59px;
    background: url(bar-ends.gif);
    }

    ==================================

    Hope that helps
    wwright

  4. #4
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question regarding absolute positioning and stretching to fit

    Originally posted by ThirdShiftRich

    http://www.3rdshift.org/vfmagic
    As far as I know... you need to put the images you want to "stretch" in a cell background. Normal images won't stretch.

  5. #5
    SitePoint Member
    Join Date
    Dec 2002
    Location
    pasig
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you tried to make your image to be a backgroung of a DIV then set it to repeat-x or y instead of puting it as an <IMG>? if your image has a pattern this would be your best option.

  6. #6
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by copongcopong
    have you tried to make your image to be a backgroung of a DIV then set it to repeat-x or y instead of puting it as an <IMG>? if your image has a pattern this would be your best option.
    Yep, that or a cell background.


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
  •