Forum:Vertical allignment in div boxes

Hi I've created a div box with three columns - the first and third of which have two lines of text. Can I centre the text in the middle column in between the two rows, and if so, how?TellyFan 08:46, July 25, 2011 (UTC)


 * Hi TellyFan, how did you create the columns? -- Weas-El ✉  09:01, July 25, 2011 (UTC)

It looks like this: TellyFan 09:28, July 25, 2011 (UTC)


 * You can better use a normal table for that:


 * If you really want to use the divs, just add a margin:


 * - Tjcool007 (Talk) 09:39, July 25, 2011 (UTC)

Thanks! I don't want it as a table - I did it as divboxes deliberatley to avoid the white space between the two colours! Thanks for your help! TellyFan 09:46, July 25, 2011 (UTC)


 * That can be removed actually:


 * - Tjcool007 (Talk) 09:49, July 25, 2011 (UTC)
 * I was in a rush just now as I'm in a library and was running out of session time! I've managed to log back in for 5 minutes! I hadn't noticed straight away that in the second version the colour is missing from the top and bottom. Can this be fixed? The bigger problem with the table is I don't think you can use tables inside infoboxes, can you? That's what it's designed for. TellyFan 09:56, July 25, 2011 (UTC)

Ugh! The preview thing is messing this big time.
 * Thanks for another attempt, but even when you scale the box right down the third column is still underneath the rest of the box! TellyFan 16:55, July 25, 2011 (UTC)

I lost track of what was going on here but I'll answer your question: Yes, you can use tables inside infoboxes. Infoboxes are usually a table with something inside; that something can be another table. In fact, many infoboxes are made of several tables nested inside each other because it's a lot easier to do than any other way. 20:20, July 25, 2011 (UTC)
 * Thanks, just wondering can you put tables directly into an infobox or do you have to have it in a seperate template? I still couldn't get tables to work directly in the infobox but I've got exactly what I want now through the seperate templates - which was actually easier than having them directly in the infbox anyway! Only thing is I forgot to put the final "|}" on the end of the templates! Oops!TellyFan 23:43, July 26, 2011 (UTC)
 * Well, if give us a link to those infoboxes and templates we'll be able to tell you more.
 * But of the top of my head:

01:43, July 27, 2011 (UTC)
 * using wiki code (instead of html) to create the tables is giving you problems and will give you problems.
 * you are using tables and want the columns of the inner tables to align with the outer tables (infobox). That's one of the goals of using tables inside tables, we don't want them to align. ;) In case you want them to align you will have to put width in columns of both tables and that is a lot of work.
 * the reason your template(s) work is because they introduce extra "features". But this usually manifests the other way around, people make things work by putting the templates directly inside the infobox.