Forum:Need some help with templates

Hey,


 * I'm working on Reptipedia, and I could use some help making the templates stable.


 * First off is the Stub template. It looks nice at first, but I'm having trouble keeping it consistent when put to practice. For example, if I put it on a stub article, under certain circumstances the box will change shape or move out of the text area, or the image will move. The box also tends to mess up when it's near another template, like an infobox. I need the image to stay right where it is, and the box to stay centered and not interfere with anything. If anyone could help me with this, that'll be great. --Thesaurus Rex 04:13, July 25, 2011 (UTC)


 * You could add  on the bottom of the template code to ensure the template won't align with other objects if you place the template on top of the page. — Sovq 05:23, July 25, 2011 (UTC)
 * Okay. How do I implement that in now? Thesaurus Rex 05:02, July 26, 2011 (UTC)


 * Add that to the bottom of your template.--
 * Cool, it worked! Now how exactly do I make the image stop moving around? Here's the American Alligator page for reference. Thesaurus Rex 08:10, July 26, 2011 (UTC)


 * I cleaned the template code up a bit - hope that's no problem? Now it shouldn't re-align the image. Also, you don't need to add a number of new lines before the template - you can place it just under the article text and it should display as intended (I hope). — Sovq 09:15, July 26, 2011 (UTC)
 * Awesome, thanks. I'm not too good at this CSS stuff, lol. If there's one more thing, and that might be it, but is there a way to put a border around the images? Thanks. Thesaurus Rex 12:31, July 26, 2011 (UTC)
 * You need to add  around the image, and change   to the color you want.
 * Sure, just replace |Geckostub.png

with:
 * style="width:50px; border:1px solid #667755;"|Geckostub.png
 * Be sure to have the image size and the width parameters the same or else the border may include a bit more than just the image.
 * But then again, you are going to replace that image, aren't you? Template-info.svg looks better for it.
 * It's a matter of taste but I've always seen the stub notice (and others) being put on the top of the page, I don't know if you just put it at the end and didn't care.
 * 13:36, July 26, 2011 (UTC)