some divs are not full width until i resize window problem

5 replies · opened Mar 6, 2020

MmikeyturnerconceiveitMar 6, 2020

Hi Guys

We have had a couple of display issues creep into a canvas project. They weren't there to begin with so something has changed over time. They are different issues but probably related. Tested on chrome, but the same on other browsers.

The first issue is here.
https://www.castlegolf.com/issue1.asp
You can see the latest news div is not expanding to full width when you first load the page. If however you change the browser window size then the layout sorts itself out correctly.

second issue is here.
https://www.castlegolf.com/issue2.asp
Very similar in that the div is not automatically expanding to full width until you resize the window.

Any ideas would be greatly appreciated. attached images show problem.

Many thanks

Mike

SSemicolon WebSTAFFMar 8, 2020

Hello,

We have just tried using your Owl Carousel codes on Our Demos and the Carousel appears to be working perfectly fine for us with 100% Width relative to the Container. This issue could be related to the HTML Validation errors on your Page: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.castlegolf.com%2Fissue1.asp and https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.castlegolf.com%2Fissue2.asp . Try fixing the errors and these issues should be automatically resolved.

Hope this Helps!

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

MmikeyturnerconceiveitMar 12, 2020

Hello

Thanks for pointing that out, I have cleaned up the validation errors but they did not resolve the issue.

However I have isolated the css causing the problem, but I can't solve it.

In style.css there is this
#header.transparent-header + #slider,
#header.transparent-header + #page-title.page-title-parallax,
#header.transparent-header + #google-map,
#slider + #header.transparent-header {
top: -100px;
margin-bottom: -100px;
}

And specifically it is the margin-bottom: -100px; causing the issue. If I take this line out (or actually keep the value 0px or higher) then I do not get any display errors. It works perfectly. However I need the margin-bottom: -100px so the slider is in the right place at the top of my page for styling purposes.

Any ideas what I could try? It seems the margin-bottom seems to throw a few wobbles on elements of the page - like the carousel.

Mike

SSemicolon WebSTAFFMar 12, 2020

Hello,

Thank You so much for more details on the issue and fixing the previous issues with the HTML Validation. This would help us in finding the correct solution. And according to the possible codes you have mentioned above, you can consider adding the following code just after the #slider DIV ends:

However, we are still not sure if this would work since the affected container is a little bit more deep. If the above solution does not work, we would suggest you to review the codes and consider building this from scratch as it appears that something went wrong while assembling the DIVs. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

MmikeyturnerconceiveitMar 13, 2020

Hey many thanks, this worked if you put that after the section.

solution:

<section id="slider" class="slider-element slider-parallax revslider-wrap clearfix">
<div class="slider-parallax-inner">...</div>
</section>

<div class="clear"></div>

Thanks for your help in resolving this.

Mike

SSemicolon WebSTAFFMar 13, 2020

Hello,

Glad that your issues were resolved. Very Happy to Help!

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

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