It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Adjustable Image Height

Adjustable Image Height

Postby Wogan_Mike on Sun Mar 18, 2007 8:27 pm

I have a table which in the center cell (cell 3) has text, and in the surrounding 5 cells (cells 1, 2, 4 & 5) are images which comprise a border around the center cell. Obviously as the center cell increases in height, the cells to its left and right (cells 2 & 4) will increase in height also. I'm wondering if it is possible to have it so as those cells get taller, the images inside those cells will grows in height as well.

The graphic below demonstrates my question-

Image

Is this possible and if so how?

Thanks,
Mike W.
Wogan_Mike
 
Posts: 41
Joined: Mon Mar 12, 2007 11:34 pm

Postby generalchaos316 on Sun Mar 18, 2007 9:23 pm

Ok, I am still a relative HTML/CSS nooblet but if you are using this (or something like it) to style in the background image to your cells...

Code: Select all
#table {
    Other styles here;
    background-image: url(images/whatever.gif);
}


...then, assuming you have your image set up so that it perfectly tiles I would think that you could add this into your stylesheet...

Code: Select all
background-repeat: repeat-x; <!-- For your top and bottom borders -->

background-repeat: repeat-y; <!-- For your left and right borders -->


This is just straight theory from a reference book so I hope it works for you. Also, if using this approach, I would think it would be in your benefit to get the images as small as possible while allowing them to still tile. Otherwise you could end up with some odd looking whitespace at the bottom of your page. I'll keep my fingers crossed for ya!
generalchaos316
100+ Club
 
Posts: 101
Joined: Fri Mar 16, 2007 6:01 am

Postby Wogan_Mike on Sun Mar 18, 2007 9:58 pm

I appreciate your help.

The thing is I'm not using css to insert the images, the border images are not set as the cells' background. They are just inserted images. And tiling them would not work because the top and bottom of the images wouldn't line up and it would funny.

If you have any other suggestions I would greatly appreciate them.

Mike W.
Wogan_Mike
 
Posts: 41
Joined: Mon Mar 12, 2007 11:34 pm

Postby generalchaos316 on Sun Mar 18, 2007 10:04 pm

So you are just inserting the image into the cell then? I am assuming with Dreamweaver 8 as well?
generalchaos316
100+ Club
 
Posts: 101
Joined: Fri Mar 16, 2007 6:01 am

Postby Wogan_Mike on Sun Mar 18, 2007 10:11 pm

Yes that's correct.
Wogan_Mike
 
Posts: 41
Joined: Mon Mar 12, 2007 11:34 pm

Postby generalchaos316 on Sun Mar 18, 2007 10:17 pm

Ick. You have me stumped. It seems like it would be easier to use CSS to achieve what you are talking about. Can you post a link to that page so that I can see what you are talking about? Maybe I will get some more ideas at that point.

Also, you said that the images can't be tiled because the top and bottom of the images wouldn't line up. Without stretching the image (a horrible idea) how did you envision that the image could be dynamically scaled?
generalchaos316
100+ Club
 
Posts: 101
Joined: Fri Mar 16, 2007 6:01 am

Postby Wogan_Mike on Sun Mar 18, 2007 11:38 pm

I supposed tiling might work, I'll try using css and let you know how it goes.

Thanks again.
Wogan_Mike
 
Posts: 41
Joined: Mon Mar 12, 2007 11:34 pm

Postby jberry on Mon Mar 19, 2007 5:57 pm

the best way to do it is to highlight the cell and set the background color to whatever color you can use the color picker and select somewhere in the image and the rest will be filled by all color. That is the easy and best way if you are not using css. and are just using tables and importing the image
jberry
100+ Club
 
Posts: 144
Joined: Mon Mar 19, 2007 4:40 pm
Location: Atlantic City, NJ


Who is online

Users browsing this forum: No registered users and 6 guests