Position of "comments box"
-
I would like to move the “comments box” from where it is, sitting below all existing comments, to have it sitting at the top of all existing comments immediately below the article itself..
Can someone help me with this please?
The blog I need help with is: (visible only to logged in users)
-
I should add that I have already resolved this problem on the existing site but can’t remember how, and I am about to change theme and will need to do it again on the new theme!
-
-
OK, well I used this bit of code:
}
div#respond {
position: absolute;
top: 0;
}which seems to have moved the “leave a reply” box up above the comments themselves but the box is now really small and tends to cover up the first comment. Is there any way of avoiding this?
The full code I’m using now is this:
#comments {
position: relative;
}
div#respond {
position: absolute;
top: 0;
}#comments-title {
padding-top: 40%;
}#comments > div#respond {
position: absolute;
top: 0;
background: #fff;
} -
Hi, no unfortunately I still can’t get it work on the test page for the new theme (Tortuga). I can move the comments box up to the top but even with the code you suggested, it is still only about a quarter of the full width (which is okay but doesn’t look great) and it still sits on top of the first comment and covers it up even more when you click inside to write your comment.
-
This is the situation at the moment:
I’m using this code on the existing “choco” theme:#comments {
position: relative;
}div#respond {
position: absolute;
top: 0;
background: #fff;
width: 90%;
}#comments-title {
padding-top: 30%;
}#comments > div#respond {
position: absolute;
top: 0;
background: #fff;
width: 100%;
}It seems to be working well. If I adjust the “padding-top” value I can increase and decrease the amount of space that I get between the comments box and comments title and the start of the comments.
With the “tortuga” theme that I am experimenting, everything seems to work except that the “padding-top” value doesn’t seem to create any space as it does on the “choco” theme. Is there a different way of creating this space?
-
CSS is theme specific, so there could be differences. Working on my test site with Tortuga, this is what I came up with.
#comments { position:relative; padding-top: 240px; } #respond { position: absolute; top: 0; width: 90%; }There will appear to be quite a bit of white space between the bottom of the entry box for a reply and the comments below, but that is because the comment box expands downward when you click into it with login options.
I would test this both when logged in and when logged out. In my testing all looks good both ways.
-
-
Oops…there does seem to be a problem with this code when replying to an existing comment. The reply box opens up at the top and not under the post you’re replying to and it also tends to cover the post beneath it. Once you’ve sent the reply it ends up in the right place, but it is a bit confusing while you’re writing. Is there another bit of code to avoid this?
-
That is one of the problems with a move like this due to the code that has to be used to do it. Basically the element moved loses its relationship to the other elements and floats free within the parent element. That means that when it expands when you click on it to enter a comment, it cannot push the other elements (comments below) down to keep things from overlapping. There really isn’t a way to fix this other than to move the comments way down so that it would not overlap, but then when the reply box section is not clicked on, there would be a large gap between it and the comments below it. What you can do is adjust the 240px top padding value until it does not overlap and see if you can live with that extra whitespace between.
-
I follow you with that, but I’m not sure if I was clear about the problem that I encountered with your new code which otherwise was perfect. With the new code, the comments box moves to the top and yes, okay, you need a bit of white space below for when it opens up. That’s all okay. The problem I found was when I needed to reply to a comment that was already at a certain distance from the comments box space at the top of the comments. Normally, when clicking on reply I would get a reply box opening up in the same place as the comment I am replying to. Instead, what happens now is that I am obliged to reply in the comments box that sits at the top of the comments and is at a certain distance from the comment I’m actually replying to. This creates considerable confusion for the person replying. The thing is that I would have thought that this was controlled by a different piece of code – but I am a complete newcomer to this so I may well be missing something completely.
-
Ah yes, and my explanation goes to that too. We have set the position of the reply box using position: absolute, and that keeps the comment box from appearing below the comment which you are replying to. There isn’t away that I can see to fix that.
-
Hmmmm…..
So it looks like one way or another, I’m going to have to accept a compromise. What a pity. Oh well, I guess I’ll learn to live with it…
Thanks for all your help in any case. -
-
Well, I’ve had to go back to the original “box at the bottom” position because the reply box not corresponding to the original comment position is just too confusing and you can’t refer visually to the original comment in order to decide how to reply because you can’t actually see the original comment while you’re replying. Ho hum…life goes on.
Thanks again for your time. Always appreciated.
-
Given the possible confusion, I think that is best. Let us know if you have additional questions.
-
- The topic ‘Position of "comments box"’ is closed to new replies.