Mysterious Margin

1 reply · opened Jul 14, 2020

Llsualeng13Jul 14, 2020

Hi. I have a problem with footer. There is a mysterious margin appearing in the html element when showing on the website.
I have not write any margin-top command in the html code. Writing style="margin-top:0;" doesn't fix this issue.
It seems to always be overwrite by this mysterious "margin top=18px". Changing browser doesn't fix this.
Although, it disappears when the screen is md size.
I still don't think it is an responsive css issue because when I inspect it. It appears in the html element.

Here is my footer:

<footer id="footer" class="border-0" style="background-color: #ecf0f1;">

		&lt;div class="container center" style="background-color: #ecf0f1;"&gt;
			&lt;div class="footer-widgets-wrap"&gt;

				&lt;div class="row mx-auto clearfix" &gt;

					&lt;div class="col-lg-4 col-md-6 col-sm-12"&gt;

						&lt;div class="widget clearfix"&gt;
							&lt;h4 style="color: #4e4c8f;"&gt;About us&lt;/h4&gt;

							&lt;h5&gt;&lt;/h5&gt;								
						&lt;/div&gt;

					&lt;/div&gt;

					&lt;div class="col-lg-4 d-md-none d-lg-block"&gt;

					&lt;/div&gt;

					&lt;div class="col-lg-4 col-md-6 col-sm-12"&gt;

						&lt;div class="widget clearfix"&gt;
							&lt;h4 style="color: #4e4c8f;"&gt;Contact&lt;/h4&gt;

							&lt;h6 class="lead" style="font-size: 1rem; line-height: 100%;"&gt;Email:
							&lt;br&gt;
							&lt;br&gt;&lt;/h6&gt;
						&lt;/div&gt;

					&lt;/div&gt;

				&lt;/div&gt;

			&lt;/div&gt;
		&lt;/div&gt;

		&lt;div id="copyrights" style="background-color:#54529a; padding-bottom: 2%;"&gt;
			&lt;div class="container center clearfix dark" &gt;
				&lt;i class="icon-copyright1"&gt;&lt;/i&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;div id="attribution" style="background-color:#54529a;" &gt;
			&lt;div class="container center clearfix dark"&gt;
				
		&lt;/div&gt;
	&lt;/footer&gt;

The inspect element is in the image.
Haven't buy hosting yet. So I don't have the live url now.
Thanks.

SSemicolon WebSTAFFJul 14, 2020

Hello,

There can be several possible causes of this:

  1. Your Page is smaller than expected which makes the Footer Stick to the Bottom of the Page by adding a Custom Margin.

  2. Your HTML Structure is incorrect. make sure you follow the Default HTML Structure Guidelines: http://docs.semicolonweb.com/docs/getting-started/html-structure/ .

  3. Your Page has HTML Errors. Please validate your Codes here: https://validator.w3.org/ and fix the HTML Errors if any.

This should fix this issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard