![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have a div with black background and an image inside. The image width can vary between 100px to 200px. I would like the width of the div to adapt to the width of the image. Is this possible? Should I make the div width equal to the minimum with of the image, in this case 100px? What is the correct way to do this? |
#3
| |||||
| |||||
|
|
Hello, I have a div with black background and an image inside. The image width can vary between 100px to 200px. |
|
I would like the width of the div to adapt to the width of the image. |
|
Is this possible? |
|
Should I make the div width equal to the minimum with of the image, in this case 100px? |
|
What is the correct way to do this? |
#4
| |||
| |||
|
|
I have a div with black background and an image inside. |
|
The image width can vary between 100px to 200px. I would like the width of the div to adapt to the width of the image. Is this possible? Should I make the div width equal to the minimum with of the image, in this case 100px? |
|
What is the correct way to do this? |
#5
| |||
| |||
|
|
Say what more exactly you are doing. |
|
(How is that Portuguese food I ordered from you coming along?) |
#6
| ||||
| ||||
|
|
On Sep 14, 11:51Â*pm, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: Say what more exactly you are doing. Basically I am working on a simple centered design for a photographer portfolio. It contains a menu with only 2 buttons and under it a photo. The photo is generated from a database and can have two formats: landscape or portrait. I would like to not leave empty space on the right and left of the portrait photo. So I have two options: 1. Make the width of all portrait photos equal to the width of the landscape photos. The problem is this way the portrait photos become much larger than the landscape ones. The advantage is that the site width is always the same which is better for the eyes as mentioned before. |
|
2. Make the container div resize to image width. I would make portrait images a little bigger then landscape so that the width don't vary much. The menu is not a problem since it contains only two buttons so it will always fit inside the div. I am considering choosing (1) but I would like to see how (2) would look like ... |
|
(How is that Portuguese food I ordered from you coming along?) Portuguese food is really really good but what is good takes time ... :-) |
|
How is the food in down under? You eat cangurus? :-P |
#7
| |||
| |||
|
|
Why are you insisting on the DIV being visible rather than as a mere container for the purpose of ... well... general contentment... sorry I was thinking of food... I meant containment (inline IMGs generally needing not to be loose in BODY). |
|
Now! What I said above should be worth one of those caldo verde soups, chicken on the spit jobs for main with all the trimmings and one of those pastel de natas to finish off with? |
|
Sunday I ate snapper grilled with chips and Greek salad at La Peruse, Tues I ate Lebanese at Lakemba, Wed it was Vietnamese at Marrackville, tomorrow it will be Sri Lankan, getting the picture? No, I did not eat wichita grub or roo or snake tonight, pork chops actually! |
#8
| |||
| |||
|
|
On Sep 17, 11:18Â*am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: Why are you insisting on the DIV being visible rather than as a mere container for the purpose of ... well... general contentment... sorry I was thinking of food... I meant containment (inline IMGs generally needing not to be loose in BODY). I am insisting on the div because: 1. The menu buttons should be left aligned to the picture left. |
|
2. The menu container should have a grey background and it should have the same width of the picture. |
#9
| |||
| |||
|
|
On Sep 17, 11:18 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: snip Ah I am completely wrong about Australian food. :-) |
#10
| |||
| |||
|
|
Last night we had "Coat of Arms" stew - Kangaroo and a little smoked Emu in a red wine sauce, with Wattle seed dumplings! Try doing that with any other country's coat of arms. Where do you get Unicorns these days? And I imagine you'd be "renditioned" if you tried a Bald Eagle. |
![]() |
| Thread Tools | |
| Display Modes | |
| |