13

The question How to hide the entire element if part of the element overflows vertically? was closed by 5 members of the community. It was then reopened by a moderator. Here is an image of the question as it was closed in:

enter image description here

I believe that this question is too broad and unclear because it lacks information about the HTML structure, position value of the children, display type of the children, and lack of exactly what the OP means by the term "hide" (visually? in the DOM?).

Should the original question have remained open or should it have been closed?

1
  • The original question was perfectly clear about what the end goal was: vertically stacking boxes within a fixed height container and hiding any box that overflows. That's easily a clear enough problem statement to be able to provide answers. It's true that nailing down the details you're complaining about the absence of would've made the question narrower, but it would've done so at the cost of making it less practically useful, by arbitrarily excluding classes of solution that there'd usually be no reason to exclude in the real world.
    – Mark Amery
    Commented Dec 21, 2017 at 11:05

6 Answers 6

20

Quite honestly, I think it was probably fine in its original form. Critically, it's not a debugging question: the asker doesn't have a fixed set of elements and styles that aren't working out for some reason, he's designing a layout for a specific goal and has the ability to create whatever markup and styling is needed to fulfill that goal. There are almost certainly multiple approaches that would work here; so what? If they work for the fairly narrow scenario described by the question then they can be found and used.

This hits on something I wrote about a couple of days ago: as a community, we've gotten much more conservative over the years as to what sorts of questions we'll tolerate. As much as everyone loves to complain about them, "debug my code" questions are among the safest questions to ask here - as long as you include your code and a clear problem statement, there's no chance they'll be too broad (although the opposite problem is extremely likely...)

Situations like this - an experienced member of the site getting shot down while trying to share something they learned - were one of the big motivations for launching Documentation; indeed, Kevin touches on this in his initial proposal:

Topics are broader in scope than Questions. In fact, we're expecting that if you "asked" most requests, they’d be closed as Too Broad.

Internally, this idea loomed large in the initial pitch; we envisioned a future where a lot of the "debugging" questions that plague Stack Overflow today would be funneled into a separate "mentoring" system, while the meatier questions would end up getting answered in Docs. Perhaps we should've put a bit more emphasis on this...

In any case, I find it hard to argue that rejecting information like this - whether offered in Q&A or in Docs - does anyone any good; the question is broader than "why is the border of my box getting cut off", but is hardly so broad that an "adequate answer" cannot be identified.

1
  • 1
    Thanks for a more in depth explanation of the purpose of Docs and how they relate to questions like the linked one Commented Apr 22, 2017 at 0:11
16

This question belies an existing issue with the Q&A system on Stack Overflow: the self-answer. When this option is checked, you can create a Question and an Answer at the same time, as a way of showcasing the solution to an issue or question you just dealt with, and want to share:

'Q&A-style' checkbox

Gajus used this option to create a 'Q&A-style' post, where the meat of the implementation resided only in the answer. This is a little problematic because we're traditionally supposed to judge a question on its merits alone. This means we don't look at the answers during our first pass of deciding whether the question is on-topic or not.

Obviously in this case, that first pass is not enough. The Question and Answer here exist as two parts of a whole. Unfortunately, there's no banner or message in the Stack Overflow Q&A system that notifies readers that "hey, this is a self-answer, please look below for the solution". Also unfortunately, SO has kind of moved in a fragmented way regarding fixing this problem - they've started pushing SO Documentation for what used to be a good case for self-answer Q&A questions.

Regarding this question, once aware that the answer was posted at the same time, it's hard for me to argue that the question doesn't have the MCVE that I thought it needed before. While I think the question would be better with the "before" code (and that code has since been added in), the question's scenario is basic enough.


In summation, the question as it is now should remain open, perhaps with a N.B. by the author that this is a self-answer post. It'd be good, too, if the author could revise the code to match his self-answer markup. Ryan should not have added his own code into the question, when his own code differed so much; as Makyen's answer describes, that goes too far beyond what an edit should do: providing enough detail is the OP's job.

Stack Overflow also needs to include a banner for self-answer posts (perhaps with a quick anchor link to the relevant answer, in the event that other answers are added. Of course, we're sort of at the 'quick-as-molasses' pace with Q&A features/iteration right now.

9
  • 5
    Users searching for a similar question with a different implementation (say, the children weren't siblings, they had position or display necessarily imposed other than what the answer suggests, or their layout is horizontal, not vertical) would find the original question and it couldn't help them. As such, I don't think this is a problem with the self answering system feature, but a problem with the nature of the original question itself. Even self answering questions should be sufficient in their question alone Commented Apr 21, 2017 at 18:40
  • 1
    "or their layout is horizontal, not vertical" the question explicitly says "vertical overflow". Can you construct an example question where position and display are relevant to the answer? In this question, they are not relevant.
    – Gajus
    Commented Apr 21, 2017 at 18:48
  • 12
    Questions should be evaluated on their own merits. A self-answered question should have enough information in it such that anyone qualified can answer the question. The goal is to have a repository of Q&A, which is contributed to by the community at large, not a bunch of questions which can be only fully answered by the original OP due to lacking information in the question. As the question was originally written, it requires significant assumptions to be made by anyone answering it. That does not make for a good question, and is usually off-topic because the answer-space is too large.
    – Makyen Mod
    Commented Apr 21, 2017 at 18:53
  • 2
    @ZachSaucier The original revision's title included "when part of the element overflows vertically".
    – TylerH
    Commented Apr 21, 2017 at 18:54
  • 4
    I feel like having to include a comment that this post is self-answered wholly undermines the point.
    – Makoto
    Commented Apr 21, 2017 at 19:07
  • @Makoto to your first comment, I agree, as my comment on torazaburo's answer details. Also I should point out just in general that my answer is regarding the Q&A in its current/ultimate form, not regarding the initial revision.
    – TylerH
    Commented Apr 21, 2017 at 19:37
  • 2
    Yeah, this has been an issue ever since we added that checkbox. The problem with adding banners and such is that these still function as normal Q&A - if the question is good and the answer is crap, you definitely don't want to be favoring the first answer. The push for Docs here is primarily recognizing that it's becoming difficult for folks to recognize questions that aren't about debugging something; we shouldn't need a banner to say "hey folks, there's no code-dump here".
    – Shog9 Mod
    Commented Apr 21, 2017 at 23:56
  • 3
    I know in my head it won't work, but in my heart, I want to put some text there that reminds prospective self-answers that the question part needs to stand on its own, just like any other question. At least that would facilitate the "I told you so" dance on Meta, which is oh so much fun.
    – Cody Gray Mod
    Commented Apr 22, 2017 at 13:02
  • Agreed, but it shouldn't have been a mod single-handedly deciding this for everybody. Commented Apr 23, 2017 at 13:47
6

It requires a serious lack of imagination to assert that the question is too broad because it lacks information about the HTML structure--what's unclear about

a fixed width and height container that consists of arbitrary height elements stacked vertically

Sure, I could provide the HTML for that, but what's the point exactly? Why are you concerned about the position or display type of the children--they're just relative and block respectively. "Hide" means "don't show", what's so complicated about understanding that? Since it's a CSS question, it doesn't take a genius to figure out that he wants to not display it, rather than removing it from the DOM.

It's a good question accompanied by a creative answer, which did not depend on having the irrelevant details you seem to think are so important provided.

10
  • 3
    While this is a reasonable argument, I still believe that the noted details are necessary for a clear question (and that the original title should be edited to reflect said question) Commented Apr 21, 2017 at 18:43
  • 12
    I don't understand why it's so important to leave out the HTML/CSS that shows at least an attempt at having tried to figure out the problem previously. Or is it because the user has 19.9k that they don't need to provide evidence of research? Commented Apr 21, 2017 at 18:44
  • 1
    @MikeMcCaughan Do you realise that I answered the question at the time of raising the question? This question was created for the sole purpose of documenting an issue and a solution.
    – Gajus
    Commented Apr 21, 2017 at 18:46
  • 11
    @Gajus Do you realize that we expect questions, even self-answered ones, to be of the same high quality? See meta.stackoverflow.com/q/314165/215552 for instance. Commented Apr 21, 2017 at 18:50
  • 9
    The question suffers from a lot of implied detail. We have to make assumptions, which is bad. Admittedly, the assumptions we have to make are pretty safe ones, but they're still assumptions. The issue could've been avoided from the outset if OP had just included more detail on where he was starting from. Does he have divs or ps or sections or tables? Can he use flexbox or not? Does he have to support certain browsers? The answers to these questions aren't always relevant, but they can change the answer completely. Granted, this is a self-answer, so it's a unique situation either way.
    – TylerH
    Commented Apr 21, 2017 at 18:52
  • 4
    @MikeMcCaughan I am referring to your snarky remark "Or is it because the user has 19.9k that they don't need to provide evidence of research?" Thats in poor taste.
    – Gajus
    Commented Apr 21, 2017 at 18:54
  • 4
    Here's a question from today, that included a single ruleset with two declarations, and a short and sweet description of the problem. Somebody asked for code, somehow without noticing the CSS that was already included with the question; the asker gladly added a Stack Snippet anyway... that illustrated nothing that couldn't already be gleaned from the existing description without making many assumptions. The question doubled in length but I'm honestly unsure if it's very much better now than it was before.
    – BoltClock Mod
    Commented Apr 22, 2017 at 12:52
  • 1
    Oh no. The "give me teh codez!!1" disease has spread. Now it isn't just the askers, it's also affecting the answerers.
    – Cody Gray Mod
    Commented Apr 22, 2017 at 17:06
  • I can understand "hide" being unclear, though. Most askers that just say "hide" don't bother making the distinction between visibility: hidden and display: none, which have wildly different effects. In this very specific case, however, it probably makes no difference (unless overflow is set to auto instead of hidden, which is unlikely given the use case).
    – BoltClock Mod
    Commented Apr 23, 2017 at 5:16
  • 4
    "what's unclear about 'a fixed width and height container that consists of arbitrary height elements stacked vertically'" Quite a lot. The code being asked about could be almost anything. Of course the answerer just happened to be able to guess exactly what was being asked, because the answerer was the asker. But that doesn't change the fact that the question part itself is not of sufficient quality and clarity. Anyone else answering (and, yes, they are welcome to do so!) would have little to no chance at stumbling upon what was meant exactly. Commented Apr 23, 2017 at 13:48
-1

Question revisions, timeline

The original question, as closed, should have been closed. It was too broad.

The edit, by another user, adds code to the question, which does help to narrow the question significantly. While the question in that form is probably reasonable, that edit appears to put words in the OP's mouth. In other words, that the edit is one that I would reject, if I were reviewing it. Adding that much content to a post is beyond what we normally strive for when editing questions. If a question like that was desired, then a new question should have been posted by the editor. Alternately, the editor could have engaged in a conversation with the OP in chat and suggested that the code be added by the OP.

Further, it should be noted that this is a self-answered question (answered at the same time the question was posted). The code added to the question is not reflected in the self-answer. Thus, it clearly is not what the OP intended. It might reflect the general concept, but it is not reflected in the already existing answers, thus at least partially invalidating them.

My opinion, is that the edit should be rolled back, and the question re-closed. It would be perfectly acceptable for the editor who made the change to post a question with that code asking a very similar question (with a link to the original question for credit/reference). That new question could then be handled on its own merits.

Another possibility is that the OP of the question can confirm that the code added reflects the question which they were attempting to ask. This confirmation has been specifically requested of the OP. The OP has visited Stack Overflow after the request was made, but has neither confirmed that the edit reflects what they were asking, nor reverted the edit.

2
  • 1
    While the OP still didn't confirm the edits made coincided with the original intention, he also didn't deny their validity when commenting in chat Commented Apr 21, 2017 at 18:37
  • 4
    @ZachSaucier, Thanks for the chat link. A large part of the problem is that the question's OP is not taking responsibility for the question. The OP could clear up the issues quite easily, but has so far chosen not to do so.
    – Makyen Mod
    Commented Apr 21, 2017 at 18:44
-5

The question asks:

How to hide the entire element if part of the element overflows vertically?

If I was talking with you in person and needed to communicate the problem, this would be a reasonable way to communicate it. Put it another way...

Hi Zach, got a minute? I have a CSS question. I have a fixed size element. It contains arbitrary size elements. I need to hide the entire element when it overflows the parent container. How would you do it?

This made up conversation contains only the information from the original question.

I've not told you about display or position because those details are not relevant. The answer can propose a solution that uses arbitrary combination of floats, translate or clever margin.

Adding more details (such as "the elements are floated within the container") would only restrict the possible answers because of the added constraint.

9
  • 9
    If you asked me that question in person I would ask for more detail, as I did on your original post Commented Apr 21, 2017 at 17:49
  • 1
    "If you asked me that question in person I would ask for more detail, as I did on your original post" you did not... This is how the conversation went down. imgur.com/a/39g6g You've said the question is "horrid", said it is lacking "details" and code, and went on to vote close and campaign other people to join the train.
    – Gajus
    Commented Apr 21, 2017 at 17:51
  • 4
    I'd argue that saying it's a poor question and casting a CV asking for more detail is equivalent to requesting more detail. You also fail to include the discussion after that post on your question Commented Apr 21, 2017 at 17:53
  • Are you implying that you've asked for details in the comments?
    – Gajus
    Commented Apr 21, 2017 at 17:55
  • 4
    I'm implying that my actions were equivalent to requesting more details, as said in the last comment Commented Apr 21, 2017 at 17:57
  • 2
    @ZachSaucier Wow, I have a job for you in the White House press office explaining why the aircraft carrier went in the wrong direction. In this case, by the way, if someone had asked me How to hide the entire element if part of the element overflows vertically?, I wouldn't have needed any additional information, but would have just sunk immediately into deep thought about good ways to solve an eminently well-defined question.
    – user663031
    Commented Apr 21, 2017 at 19:14
  • 2
    Might sound a bit crazy, but... Consider posting your question as a topic in Docs, with your answer as an example.
    – Shog9 Mod
    Commented Apr 21, 2017 at 23:40
  • 2
    @torazaburo: Nah that's pretty vague, to the extent that I would probably wave off whoever was asking me until they could give actual details and thus not be wasting my time. Fortunately the question looks great now so we can all move on. Commented Apr 23, 2017 at 13:50
  • 3
    @Zach: "I'd argue that ... casting a CV asking for more detail is equivalent to requesting more detail." Then you'd be wrong. One, the close vote doesn't ask for more detail, it merely says there isn't enough. But more importantly, most askers cannot see the close reasons until the question is placed on hold, thus close votes make for very poor feedback. A useful comment would ask questions leading to the right sort of details.
    – Ben Voigt
    Commented Apr 24, 2017 at 6:44
-5

No, it should not have been closed at all. The question asks for a widely applicable approach to a specific problem (cf. “how do I centre text vertically in CSS?”); it’s fine and doesn’t need an instance of the problem as an example, even if one helps for illustration.

Having a self-answer doesn’t grant a question any special exemptions as @TylerH suggests, but that’s fine because this question didn’t need any. From the first revision, it was answerable on its own. It could have been improved, but didn’t need to be closed for that to happen. @torazaburo has covered this already, though, so I’ll link to rather than repeat it.

8
  • 6
    But there's not enough detail in the original question to give that a clear answer. As commented on the post now, your edits do make the question of good quality and valid, but I'm asking about the original question in this meta post Commented Apr 21, 2017 at 17:44
  • 1
    @ZachSaucier: Yes, that was the premise of your question, and this answer disagrees. It’s a layout problem, and I think it’s perfectly acceptable to ask questions on how to implement a very specific aspect of a layout in CSS. A code example isn’t the only way to describe a problem; though I added one in to help with reader understanding, it’s only one instance.
    – Ry- Mod
    Commented Apr 21, 2017 at 17:48
  • 5
    This sounds like a moderator who's overstepped his purview, overriding 5 users' desire to close the question. It would be nice to get a CM to pipe up about this question. Commented Apr 21, 2017 at 18:29
  • 3
    @MikeMcCaughan: Overriding harmfully incorrect changes is rather the point of the binding mod vote, mind.
    – Ry- Mod
    Commented Apr 21, 2017 at 18:56
  • 8
    I disagree that the question could have been answered accurately and definitively in its original revision by anyone other than OP. Any answers would have been based on multiple assumptions. I've seen more than a couple times on SO a no-detail question like this be answered by FGITW answers that are shown to be useless once OP provides some detail.
    – TylerH
    Commented Apr 21, 2017 at 19:42
  • 3
    The only reason this could be a special case is because OP posted the question as part of a self-answer Q&A post. If you think self-answered Q&A posts don't merit any special exemptions or consideration, then the question's initial version was close-worthy. You can't have your cake and eat it, too.
    – TylerH
    Commented Apr 21, 2017 at 19:43
  • 2
    Ok, @Mike - done: meta.stackoverflow.com/questions/348251/…
    – Shog9 Mod
    Commented Apr 21, 2017 at 23:36
  • 2
    @TylerH: I’m not eating any had cake, as I hoped to make very explicitly clear with the italicized “this question didn’t need any [special exemptions]”. I strongly disagree that the initial version was close-worthy, and you can read Shog9 and torazaburo’s answers for great explanations of why that is.
    – Ry- Mod
    Commented Apr 22, 2017 at 5:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .