Template talk:POEBox

That's definitely along the lines of what I was thinking. What do you think? Maybe a more grey interior color closer to #2E2F2A? Tpapp157 13:28, 28 February 2011 (UTC)


 * Is it possible to use the width value of the box as the interior width? Getting the box and the picture to match is going to be a real pain otherwise.
 * Tpapp157 14:03, 28 February 2011 (UTC)
 * Tpapp157 14:03, 28 February 2011 (UTC)


 * Remember you can put your own html elements inside, and assign whatever style you like to them. If I understand correctly you're going for similar behaviour to a normal image box (box shrinks to size of image, caption text wraps rather than increasing the box's size). There are a number of ways to acheive this. The first is to use display:table and width:1%. This causes the box to attempt to shrink to 1% of the width of the page, but with a minimum width of the largest single thing inside it. In this case that thing is an image. If the image wasn't there, it would shrink to the size of the largest word, and each word would be on a separate line.


 * Another way is to use an absolute width of the image's width + 14px. Since the left & right borders and padding add up to 14px.


 * Yet another way is to use display:table; and put the caption in a DIV with the same width as the image.


 * If the box is floated, display:table is not needed, it will already shrink to fit. The text will still need a fixed width though or the box will expand. 


 * I went ahead and made an image box version that behaves similar to a wikitext image box, so you don't have to worry about all this layout crap.  - Malice (talk) 18:30, 28 February 2011 (UTC)


 * Wow. Ok. Thanks. I did some basic html work but that was about 10 years ago and I'm more than a little rusty. I like the box. Do you think maybe the darker background color was better? It did give a better contrast. I don't know.
 * Tpapp157 18:50, 28 February 2011 (UTC)


 * Well, you can change the background colour to whatever you like, by editing MediaWiki:Common.css. The relevant entry in under div.POEBoxInner. And yes html/css layout stuff is confusing, quirky, and far from intuitive. There's probably an infinite number of ways to do any given thing, each one crazier than the last haha - Malice (talk) 19:38, 28 February 2011 (UTC)


 * I'm currently locked out of the Common.css. Tpapp157 22:22, 1 March 2011 (UTC)