Template talk:Main Page Quote of the day

From Wikiquote
Latest comment: 11 years ago by Ningauble in topic Centering
Jump to navigation Jump to search

Centering[edit]

The code currently used here is no longer displaying the QOTD in properly centered fashion. I have noticed this for the last two days now, but an admin will need to make any necessary revisions. ~ Kalki·· 13:44, 19 September 2012 (UTC)Reply

Sample 1[edit]

Quote of the day
 
  The infirmity of human intelligence is short sight. In too many cases, the wiseacres are dunces of a sort, who lose sight of the simplicity of things, and stifle and obscure it with formulae and trivialities. It is the small things that one learns from books, not the great ones.
And even while they are saying that they do not wish for war they are doing all they can to perpetuate it. They nourish national vanity and the love of supremacy by force. "We alone," they say, each behind his shelter, "we alone are the guardians of courage and loyalty, of ability and good taste!" Out of the greatness and richness of a country they make something like a consuming disease. Out of patriotism — which can be respected as long as it remains in the domain of sentiment and art on exactly the same footing as the sense of family and local pride, all equally sacred — out of patriotism they make a Utopian and impracticable idea, unbalancing the world, a sort of cancer which drains all the living force, spreads everywhere and crushes life, a contagious cancer which culminates either in the crash of war or in the exhaustion and suffocation of armed peace.
They pervert the most admirable of moral principles. How many are the crimes of which they have made virtues merely by dowering them with the word "national"? They distort even truth itself. For the truth which is eternally the same they substitute each their national truth. So many nations, so many truths; and thus they falsify and twist the truth.
~ Henri Barbusse ~
 
There is a page for each month where previous "Quotes of the Day" for each date are listed, and where registered users can make suggestions or rank suggestions for upcoming dates. The Quotes of the Year page and other archives contain more extensive listings of quotes that have already been used. See also the QOTD by month and email options.

I am not seeing the problem. Heading, quote, and author all appear centered as usual. Is there a specific code tweak that works better for you? ~ Ningauble (talk) 18:52, 19 September 2012 (UTC)Reply
I do see the problem when I look at the Main Page - although I have no idea how to fix it. :-) ~ UDScott (talk) 20:06, 19 September 2012 (UTC)Reply
I'm seeing the same problem; what are everyone's browsers? (Safari 6/Mac 10.8) I took a look at the code and couldn't immediately find where the problem was. Odd. EVula // talk // // 20:10, 19 September 2012 (UTC)Reply
I am using Firefox on a PC. ~ UDScott (talk) 20:12, 19 September 2012 (UTC)Reply
I have a theory about what is happening. The MediaWiki programmers have been experimenting with upgrading from HTML 4.01 to HTML 5. The Align and Valign attributes of the <td> element were supported but deprecated in HTML 4.01, and may not be supported any more. (I am using IE7 which tends to center table cell contents even without the attribute, by default – which has always been wrong.) Therefore, I tried moving the Center attribute from the <td> element to a <div>. Does the following "Sample 2" look any better in your browsers? ~ Ningauble (talk) 21:30, 19 September 2012 (UTC)Reply
I think you're on to something, as I just noticed that {{quotation limit}} was no longer centering (as the template's author, I know for a fact that I wouldn't have had it left-aligned). Sure enough, the centering code was for the table itself; deleting that didn't make a difference, and adding a bit of CSS to achieve the centering [if an element has a defined width, you can just set the left and right margins to auto] got it to work again. EVula // talk // // 22:59, 19 September 2012 (UTC)Reply
Independently of Ningauble's edits, I added a bit of code to {{Quote of the day}} to force the width; I noticed that long quotes worked just fine, but the shorter quotes didn't. That seems to have done the trick. (though I think Ningauble's would have as well) EVula // talk // // 22:50, 19 September 2012 (UTC)Reply
Works for me. ~ Ningauble (talk) 15:19, 20 September 2012 (UTC)Reply

Sample 2[edit]

Quote of the day
 
  The infirmity of human intelligence is short sight. In too many cases, the wiseacres are dunces of a sort, who lose sight of the simplicity of things, and stifle and obscure it with formulae and trivialities. It is the small things that one learns from books, not the great ones.
And even while they are saying that they do not wish for war they are doing all they can to perpetuate it. They nourish national vanity and the love of supremacy by force. "We alone," they say, each behind his shelter, "we alone are the guardians of courage and loyalty, of ability and good taste!" Out of the greatness and richness of a country they make something like a consuming disease. Out of patriotism — which can be respected as long as it remains in the domain of sentiment and art on exactly the same footing as the sense of family and local pride, all equally sacred — out of patriotism they make a Utopian and impracticable idea, unbalancing the world, a sort of cancer which drains all the living force, spreads everywhere and crushes life, a contagious cancer which culminates either in the crash of war or in the exhaustion and suffocation of armed peace.
They pervert the most admirable of moral principles. How many are the crimes of which they have made virtues merely by dowering them with the word "national"? They distort even truth itself. For the truth which is eternally the same they substitute each their national truth. So many nations, so many truths; and thus they falsify and twist the truth.
~ Henri Barbusse ~
 
There is a page for each month where previous "Quotes of the Day" for each date are listed, and where registered users can make suggestions or rank suggestions for upcoming dates. The Quotes of the Year page and other archives contain more extensive listings of quotes that have already been used. See also the QOTD by month and email options.