Simple:Press Documentation

Why do columns appear underneath each other?

If your forum columns – most notable on the Topic View (posts) – are not lined up correctly, and the post content appears below the user data on the left then you need to adjust the column widths. This can happen for a variety of reasons. A narrow width for the forum to fit in can cause this. Or an overlarge graphic used, for example as a rank badge, can widen the user section and force the content below. This might also be more noticeable using Internet Explorer which handles margins and padding in a non-standard way.

How to fix it

You will need to edit the affected template. If the above example then this will be the spTopicView.php template which can be found in the /templates folder of your selected Simple:Press theme. You can use the built in Theme Editor for this.

If you scroll down to the Posts display section you will find a series of ‘Columns’ defined – clearly marked in the comments. In the case of the Topic View template there are just 2 columns.

Looking at the code for this you should see the entries that look like this:

sp_ColumnStart('tagClass=spUserSection spLeft&width=15%&height=50px');

Note that each of these calls to sp_ColumnsStart() contains a ‘width‘ argument within them. These are most usually expressed as percentages. Each column defined will have a width and the sum of all the widths must be 100% or less. In the case of Internet Explorer it is usually best to aim for 98% or 99% maximum.

You will need to adjust these column widths until the display corrects itself. So – for our example – the User Section (column 1) will need to be made a little larger to cope with whatever is causing it to expand – and the Post Content section (column 2) will need to be made a little narrower. Modify until things work as desired.

As always we recommend that you create your own Simple:Press theme so that any customisation made is not lost during a future update. This is not a difficult task. See – https://simple-press.com/documentation/codex/themes/theme-basics/creating-a-theme/ for details.

More Topics In FAQ


Copyright © 2006-2019 Simple:Press. All Rights Reserved.