3

I recently answered this.

The question the poster asked was :

How do I use HTML to make [a bulleted text] another color for certain web pages?

Reading the question made it pretty obvious that the poster didn't have much knowledge is html/CSS. I don't think he wanted to fiddle with CSS at all.

So this was my answer :

What about this : (Inline style)

<li><span style="line-height: 1.714285714; color: red;"><a href="URL" target="_blank">Log in to the portal</a>.</span></li>

Change the color to the one you want.

This will override any CSS color property.

I answer the question and I don't think it needs more explanation.

The tooltip on the "DownVote" button reads :

This answer is not useful

How was my answer not useful? The asker even commented that it solved his problem..

Question

Why was my question downvoted and how can I improve its quality (and potentially improve any future answer I write)?


Related

Update guidance for How To Answer to improve answer quality?
https://stackoverflow.com/help/how-to-answer
https://stackoverflow.com/help/answering

10
  • 2
    A little formatting goes a long, long way. Commented Aug 13, 2014 at 20:27
  • 2
    I wouldn't have downvoted your answer. However, explaining what you changed and why would have made it a better one. Commented Aug 13, 2014 at 20:28
  • @JayBlanchard Care to explain more? This is the reason I'm asking here, to know how I can improve it. What do you mean "little formatting"? As you see with this current MSO post, I know how to format (Well I think I do).
    – Sifu
    Commented Aug 13, 2014 at 20:30
  • @GabeSechan I thought it was clear enough that the only thing that was changed was color: red that was added in the style="" tag. Should I always explicitly explain everything I changed to solve the problem?
    – Sifu
    Commented Aug 13, 2014 at 20:32
  • 3
    I believe @JayBlanchard meant to format the code so people don't need to scroll to read it all. That helps a lot. It's been a while since I've done any html but it seems even he missed something ;) But surely that isn't why it was downvoted (I hope). I try to always explicitly say what I have changed and will often downvote (usually after leaving a comment and not getting a response) if someone posts only code but you did have some explanation.
    – codeMagic
    Commented Aug 13, 2014 at 20:37
  • 1
    Like I said- I wouldn't have downvoted it. But you asked what you could do to improve your answer. "Add a color attribute to the span tag" would have done a much better job of explaining what the solution is than your answer. Although really I'm shocked this question wasn't insta-closed as a dupe, there's no way nobody has ever asked how to change the color of an element before. Commented Aug 13, 2014 at 20:38
  • I didn't DV the answer, I just formatted the HTML that was included so visitors would not have to scroll to see the result. When I tested your code it did not work but I didn't research any further other than to note that there wasn't any text in the span which would have accepted the color change. The link text certainly didn't. I'm guessing that would be the reason for the DV's. Commented Aug 13, 2014 at 20:58
  • 3
    At least one person thinks that "inline style r baaaaaad", so maybe 3 others do also, not sure.
    – codeMagic
    Commented Aug 13, 2014 at 21:00
  • I didn't downvote, but recommending inline CSS as the first solution definitely wouldn't get an upvote from me. It might make a good last option...maybe. The quality of your existing answer would be improved somewhat if the text explaining the change came first, followed by the sample HTML, rather than explaining after the fact.
    – Ken White
    Commented Aug 13, 2014 at 22:51
  • @KenWhite, well the poster did ask for an HTML solution, hence why I didn't answer with the CSS solution. Also, inline style can be good in multiple cases (why create a CSS class for only one span in the whole website?). Well I understand the point that I should have reformatted the code to be more readable and explain in details what I added to it. Thanks.
    – Sifu
    Commented Aug 14, 2014 at 12:24

0

You must log in to answer this question.

Browse other questions tagged .