This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Form/Comments Side-by-side
#1

I was wanting to know how the form could be reformatted. I'm working on my uncles website and there's not alot of space. Is there anyway of having the form that users fill out that would remain on the left side of the page and then have users comments appear to the right of the page instead of under the form?

Here's the site. Not much space to work with.

wmckconst
Reply
#2

To save on vertical space, you could make the following change. The form would be initially hidden and a link clicked to expand it.

http://www.commentics.org/forum/showthread.php?tid=439

Have you completed the interview?
Reply
#3

Is there no way really of having the comments display to the right of the page and have the form sit to the left?
Reply
#4

I guess this is a no go then.
Reply
#5

In general I don't recommend this change, which is why I've been a bit reluctant to provide it. Very few sites (possibly including yours) have the width to be able to do this.

In /comments/includes/commentics.php, there is this (line 125):

PHP Code:
<?php 
require_once $path_to_comments_folder . "includes/template/form.php"; //display form
echo "<div class='height_for_divider'></div>"; //display divider
require_once $path_to_comments_folder . "includes/template/comments.php"; //display comments

Replace with this:

PHP Code:
<?php 
echo "<div style='float:left;width:40%;border-style:solid;border-width:1px;'>";
require_once
$path_to_comments_folder . "includes/template/form.php"; //display form
echo "</div>";
echo
"<div style='float:left;width:59%;border-style:solid;border-width:1px;'>";
require_once
$path_to_comments_folder . "includes/template/comments.php"; //display comments
echo "</div>";

I've added some border styling so you can see exactly how the two sections are split and adjust it if necessary. When you're ready just remove this bit:

border-styleConfusedolid;border-width:1px;

Have you completed the interview?
Reply
#6

I added margin-left: 30px to the code to separate comments from the form. At the 30px there's still alot of space that can be filled on the page but if I up it to 35 px, it moves comments back under the form.

Question doesn't quite line up and the comment box is kind of long.

Here's what the site currently looks like.

Wmcconst

Here's what the code currently looks like.

echo "<div style='float:left;width:40%;margin-left: 1px'>";




require_once $path_to_comments_folder . "includes/template/form.php"; //display form
echo "</div>";
echo "<div style='float:left;width:35%;margin-left: 150px'>";
require_once $path_to_comments_folder . "includes/template/comments.php"; //display comments
echo "</div>";
(06-May-2012, 11:44 AM)Steven Wrote:  In general I don't recommend this change, which is why I've been a bit reluctant to provide it. Very few sites (possibly including yours) have the width to be able to do this.

In /comments/includes/commentics.php, there is this (line 125):

PHP Code:
<?php 
require_once $path_to_comments_folder . "includes/template/form.php"; //display form
echo "<div class='height_for_divider'></div>"; //display divider
require_once $path_to_comments_folder . "includes/template/comments.php"; //display comments

Replace with this:

PHP Code:
<?php 
echo "<div style='float:left;width:40%;border-style:solid;border-width:1px;'>";
require_once
$path_to_comments_folder . "includes/template/form.php"; //display form
echo "</div>";
echo
"<div style='float:left;width:59%;border-style:solid;border-width:1px;'>";
require_once
$path_to_comments_folder . "includes/template/comments.php"; //display comments
echo "</div>";

I've added some border styling so you can see exactly how the two sections are split and adjust it if necessary. When you're ready just remove this bit:

border-styleConfusedolid;border-width:1px;
Reply
#7

It's because you have Commentics inside a div called "frag_1" which has a width of 560px.

The form needs at least 450 pixels, and the comments need way more than the remaining 110 pixels.

Have you completed the interview?
Reply
#8

Thanks Steven.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by emmanuel505
24-Jul-2021, 11:55 PM
Last Post by nimand
25-Jan-2018, 06:30 PM
Last Post by besric
03-Mar-2016, 10:22 PM
Last Post by somalimuzic
18-Apr-2015, 05:27 PM
Last Post by aercan
05-Dec-2014, 10:44 AM
Last Post by Steven
04-Jan-2013, 09:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)