Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Graphics (https://www.askmehelpdesk.com/forumdisplay.php?f=449)
-   -   "Stretchable" Image? (https://www.askmehelpdesk.com/showthread.php?t=114845)

  • Jul 30, 2007, 09:52 AM
    RickJ
    1 Attachment(s)
    "Stretchable" Image?
    I want to use something like the below image as a webpage header.

    I lay out my sites in a table - and in this case the page width of the table will be 95% rather than a number of pixels.

    I want the width of the image to be equal to the rest of the page.

    ... so can I cut the image into 3 pieces, put them into a 1row 3column table with only the line being in the middle part... then designate the width of the line to be 100% of the cell width so that it will stretch to the appropriate width and meet the line of the left and right part of the image?

    Am I making sense?

    In short, I want the image to be in the first row of the table that's set to be 95% page width, and have the left and right sides of the image line up with the left and right sides of the rest of the page content.

    Thanks!
  • Aug 17, 2007, 07:14 AM
    jstrike
    Did you get this figured out?
    I'm trying to understand what you want but I'm a bit confused...
    You want the image in the first row to stretch the whole width of the table and the table width is 95% of the page width.
    Is the image behind the text?
  • Aug 17, 2007, 08:05 AM
    RickJ
    Thanks, jstrike, but I just went with static.

    What I was trying to do initially is put the 3 boxes and a bit of the line in one static image on the left, then the text section with another bit of the line in a static image on the right, then have a blue line in the middle that stretches with page width since the entire section is sized to percentage of screen.

    ... so in other words, have the line in the middle be whatever size it needs to be - and meet the line in the left and right side - for the viewers screen.

    ... haha probably may still not make sense, but no big deal anyway since the image width is not wider than the screen even for a viewer at 800x600.
  • Aug 17, 2007, 08:30 AM
    jstrike
    Quote:

    Originally Posted by RickJ
    What I was trying to do initially is put the 3 boxes and a bit of the line in one static image on the left, then the text section with another bit of the line in a static image on the right, then have a blue line in the middle that stretches with page width since the entire section is sized to percentage of screen.

    Gotcha (I think)... I was looking at it as a 3 row type of thing but the way you describe it it's 3 columns and the middle column stretches based on the width of the browser.

    Not sure if you tried this or not...
    An "outer" table that has a width of 95%
    A table in the first row of that table that has a width of 100%
    The first column of the first row would have a fixed width and fixed height and have a left alignment. I would go with 3 images and put them in a table rather than one image.
    The second column would have a fixed height, no fixed with.
    The third column would have fixed height/width and a right alignment.

    The blue line would actually be a table in the middle of all that whose width is 100%, a fixed height and whose background color is set to whatever color you want.

    Probably the best, but most difficult way to do this would be to use all CSS and no tables. I've started messing around with it, steep learning curve but it gives you a LOT of flexibility in your design.
  • Aug 17, 2007, 09:35 AM
    RickJ
    Quote:

    Originally Posted by jstrike
    it's 3 columns and the middle column stretches based on the width of the browser.

    Exactly.

    I see what you're saying about doing it as a nested table. That should work. I'll put this thread on my "toolbox" page.

    Yeah, I know, I should learn CSS... but truth is, I've got more work than I can handle doing easy layout-in-tables html sites I've just not been pressed to learn CSS.
  • Aug 17, 2007, 06:49 PM
    jstrike
    1 Attachment(s)
    I love a good challenge.

    See the attached zip file. I used CSS but it should be easy enough to understand.
  • Aug 20, 2007, 03:45 AM
    RickJ
    Too cool, that's exactly what I was looking for. Thank you!
    I tested it with different resolutions and it works perfect.
    I'm an old dog but I DO love learning new tricks :)

    Stretchy Table
  • Aug 20, 2007, 08:29 AM
    jstrike
    Sometimes new tricks are all us old dogs have left! :)

  • All times are GMT -7. The time now is 06:59 AM.