Page 1 of 1

Vertical spacing between tags

Posted: Wed Dec 08, 2021 4:44 am
by ArcherData
Script URL: https://archerdatahosting.com
Version of script: 3.2.4
Hosting company: Archer Data Hosting
URL of phpinfo.php: https://archerdatahosting.com/serverprofile.php
URL of session_test.php: ?
What terms did you try when SEARCHING for a solution: margin padding spacing

Write your message below:

I have noticed that whenever a <p>text</p> follows a <div></div> tag (in this case, the image is centered in a 100% width DIV) there is no vertical spacing with padding between the two. I've tried everything I can think of, but I cannot overcome this issue. Also, whenever a <p>text</p> follows <ul></ul> there is a double-space between the two, as shown at the bottom.

I would greatly appreciate some insight into these two issues. Thanks!

Image

Re: Vertical spacing between tags

Posted: Wed Dec 08, 2021 1:06 pm
by Klemen
Could you provide the sample HTML code you use instead of the screenshot? I will see if I can spot the issue.

Re: Vertical spacing between tags

Posted: Wed Dec 08, 2021 7:17 pm
by ArcherData
Here's the code for what is in the screenshot:

Code: Select all

<div style="width:100%;padding-bottom:20px;">
<img src="https://archerdatahosting.com/helpdesk/kb/wp-security-list-02.webp" border="0" align="left" width="640" height="300" />
</div>

<p style="padding-top:10px;">The same goes for other software, like MySQL, MariaDB, cPanel, Plesk, and the server operating system.</p>

<ul>
<li style="padding-bottom: 10px;"><strong>Firewalls and other security defenses</strong>. There are literally hundreds of ways your hosting provider can keep their servers secure. If they own their own servers and are co-locating them, for example, putting strict controls on the ways someone can physically access that server, for example, is something they should be doing. They should also be using firewalls and other defense mechanisms, like intrusion detection to keep unauthorized users out.</li>
<li style="padding-bottom: 10px;"><strong>Malware monitoring and/or removal apps</strong>: You should select a host that makes an effort to detect and prevent malware infections, and possibly offers full-service malware scanning and removal. When doing your research, you should inquire what the policy is when the host spots an account infected with malware and whether they offer such services, and if so, what their costs are.</li>
</ul>

Re: Vertical spacing between tags

Posted: Wed Dec 08, 2021 8:06 pm
by Klemen
Can you add

Code: Select all

style="margin-bottom: 10px;"
to the img tag?

As for <ul> you will need to overwrite the margin-top value which is set to 1em which seems to be the default browser value in most browsers (source):
margin-top: 0em;

Re: Vertical spacing between tags

Posted: Thu Dec 09, 2021 4:30 am
by ArcherData
Both helped and allowed me to remove styles from the <p>text</p> tags, making the content easier to read. Thank you so much for taking the time to review this issue for me. I really appreciate it!

Re: Vertical spacing between tags

Posted: Sun Dec 12, 2021 3:27 pm
by ArcherData
As a follow-up, I've tried to tweak the formatting of the vertical spacing. What I've learned is that it is far easier to just accept the spacing that's built it to Hesk and to not use inline styling to adjust it further. Inline styling is good for adjustments to fonts, alignment, table cell padding, etc., but not worth the effort to alter vertical spacing. Plain tags work best and are simply easier.

Re: Vertical spacing between tags

Posted: Sun Dec 12, 2021 5:16 pm
by Klemen
You can always edit the defaults in the template style files :)