Template talk:Trains portal/News image and Wikinews
From Wikipedia, the free encyclopedia
[edit] Usage
This template is used in the "In the news..." section of Portal:Trains. It takes four parameters:
- The filename of an image to use
- The alternate text of the image
- The title of the associated WikeNews article
- An empty parameter to suppress the border
For example,
- {{Trains portal/News image and Wikinews|Transrapid.jpg|Transrapid train|Transrapid collision in Germany kills 23|}}
produces the image and WikiNews link shown at right. Like {{Trains portal/News image}}, to produce a border around the logo image, omit the final pipe (|) character.
[edit] See also
- {{Trains portal/News image}} for news events without a WikiNews link
- {{Trains portal/News image flag}} to include a contry flag
- {{Trains portal/News image 2}} for news events that reference two separate entities
[edit] CSS help needed
Okay, this problem is officially difficult now. What I'd like to do is add word wrapping to the template so that Wikinews headlines wrap at 80px. The problem is that when I try adding word wrapping to the template, it doesn't quite work when the template is used within a bulleted list (as normally happens in the News section of Portal:Trains). The wrapped text is all aligned against the right margin of the list rather than floating under the Wikinews logo where it belongs. I've tried several methods to get it to work (as evidenced on User:Slambo/Template test and the samples on User:Slambo/Template usage test), but haven't gotten it yet. Any css gurus want to try? AdThanksVance. Slambo (Speak) 21:14, 22 December 2005 (UTC)
Doing the following in the template:
{| border="0" style="float:right; width:80px; margin-left:5px;" | {{{4|<span style="display:table-cell; border-collapse:collapse; border: solid 1px #BBBBBB;">}}} [[Image:{{{1}}}|none|75px|{{{2}}}]]{{{4|</span>}}} |- | [[Image:Wikinews-logo.png|none|75px|Logo of WikiNews]] |- | <small>'''''WikiNews:'''''</small> |- | <small>''[[Wikinews:{{{3}}}|{{{3}}}]]''</small> |}
... almost does it. The text and images are positioned correctly, but it stomps on the bullet if it's used within a bulleted list (as can be seen on my test page). Slambo (Speak) 21:46, 23 December 2005 (UTC)