Page 1 of 1

propose adding padding-right in index.php default and custom fields

Posted: Tue Jul 04, 2017 8:47 am
by MOB
Script URL:
Version of script: 2.7.3
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

For a while, I've had this issue. And every time you provide an update, I have to go in there and manually add this fix. So I thought, why don't I report it, maybe you can add it to future versions or provide a better solution?

Here are two screenshots of BEFORE and AFTER, I've highlighted the problem area with a red square and arrow, so you can see what the issue is, and it should allow me to easily explain the situation.

BEFORE:
Image

AFTER:
Image

Do notice that on the BEFORE picture above, that if the custom field is long and requires several lines to complete it, it will tend to put the right-hand text very near the left side-edge of the drop-down box. NOTE: This issue occurs with all of the boxes, not just the dropdown boxes.

I did attempt on tweaking the css file, but the issue is that the CSS property for td occurs in multiple pages, so it would be a global adjustment that I don't really need. Since this issue only occurs on the index.php file, so I have to go in there and hardcode the file. See my fix below...

OPEN:

Code: Select all

index.php
FIND: (all multiple instances in that page)

Code: Select all

style="text-align:right" width="150"
REPLACE WITH: (all multiple instances in that page)

Code: Select all

style="text-align:right;padding-right:5px" width="150"
And that's how I fix that issue as shown on the AFTER screenshot above.

What you can also do, is create a CSS class [e.g. customerfields] for it, but you will have to still edit that file above and add that style name for each line, so we can later target only those fields so we can do this fix in CSS.

Example:

OPEN:

Code: Select all

index.php
FIND: (all multiple instances in that page)

Code: Select all

style="text-align:right" width="150"
REPLACE WITH: (all multiple instances in that page)

Code: Select all

class="customerfields"

Code: Select all

td.customerfields {
    text-align: right;
    padding-right: 5px;
    width: 150;
}
You may want to reconsider this, and make any and all these HTML targets to be controlled by CSS, since I've noticed there is still a lot that the CSS can't control as far as colors or other types of values and properties in some of the hesk pages.

Well, hopefully this makes it into the next update, kind of tired of having to do this manually each time. :)

Take care, and Happy 4th of July! :)

Re: propose adding padding-right in index.php default and custom fields

Posted: Tue Jul 04, 2017 6:23 pm
by Klemen
There IS some padding between table fields in the original Hesk.

You probably have some other modification somewhere (CSS probably) that removes all padding from table tr?

Re: propose adding padding-right in index.php default and custom fields

Posted: Tue Jul 04, 2017 6:54 pm
by MOB
Klemen wrote: Tue Jul 04, 2017 6:23 pm There IS some padding between table fields in the original Hesk.

You probably have some other modification somewhere (CSS probably) that removes all padding from table tr?
Yes, you are right. I do use another CSS to give hesk the same look and feel as my main site.

This is why I had to tweak hesk, since I could not target just hesk when trying to fix this. Because if I make that adjustment in my other CSS, then it will be a global thing, and I don't want that.

This is why I propose to create the CSS target above, this way, people like me, can still make it work. :)