Header too wide in table portrait&landscape mode

Posted in: Newspaper
Post count: 21

Hi guys,

on the demo page (http://demo.tagdiv.com/newspaper/) the header logo (complete img incl white border in img file) and the blue line under the home logo is always aligned with the content of the page, e.g. the featured slider. This never changes even if you shrink to browser to observe the change from desktop to tablet landscape and table portrait mode.

However, on our own test page (http://www.zerspanungstechnik.org/wptest/) the header gets wider than the rest of the page when switching from tablet landscape mode. When were are in tablet portrait mode the header logo even overlaps with the header ad.

This seems to be some miscalculation in the theme. Can you help?

Thanks!

Post count: 6600

Hi,

In your case I believe this happens because of the ad banner you use and which needs to be set at smaller size for each screen width, for tablet landscape you can use this css: http://screencast.com/t/PmPV7OCShOjz

/* responsive landscape tablet */
@media (min-width: 1019px) and (max-width: 1200px) {
.header-logo-wrap img {
margin-left: 33px;
}
.td-header-style-1 {
margin-left: 48px;
width: 640px;
}
}

For portrait tablet screens use this: http://screencast.com/t/hFzRA2teR1

/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
.header-logo-wrap img {
width: 200px;
margin-left: 33px;
}
.td-header-style-1 {
margin-left: 20px;
}
}

Hope this helps!

Thanks

Post count: 21

Hi Lucian,

your CSS indeed fixes the problem with overlapping logo and ad – thanks! In my opinion I think that the theme (i.e. Newspaper) should already include this…

What’s not fixed is the misaligment of the menu. This is how it looks on your demo page (http://demo.tagdiv.com/newspaper/) in tablet mode:

Compare this to our installation where the menu icon and line underneath starts more to the left.

The settings are included/generated by Newspaper.

So, I guess there is an error there?

Best regards

  • This reply was modified 11 years by ZTWP.
Post count: 1291

Hi,

Try to disable minification, clear the cache and disable all plugins, enable only Visual Composer and check if the issue is still there. Let me know how it goes.

Thank you, Emil G.

Post count: 21

Hi Emil,

forgot to tell: I ‘ve already tried with all plugins (except Visual Composer) off. Tried it again now -> same result, i.e. it looks the same as above.

BR

Post count: 21

Hi again,

ok, after setting up a demo site and comparing them, I figured out that the problem is the child theme.

I configured the child theme as proposed in http://codex.wordpress.org/Child_Themes. This page explicitly says: “@import should not be used to import the parent stylesheet into the child theme.” simply because it’s bad for performance.

However, you propose in https://forum.tagdiv.com/child-theme-documentation/ to use import – and actually that’s the only way how it seems to work.

Is there any way to create a child theme but avoid @import in the child css?

BR

Post count: 6600

Hi,

Thanks for reporting this! I have added this on our issue tracker list, we will investigate this and fix it as soon as possible. Until then you can use the main theme or try to use wp_enqueue_style() to enqueue the parent stylesheet into child theme.
Sorry for the inconvenience!

Thanks again for reporting this.

Post count: 21

When reporting this for the first time I already used wp_enqueue_style, but it did not work. Now, I tried it again and investigated further. I figured out that the order of the CSS was not wrong any more. Fortunately, wp_enqueue_style has another parameter to specifcy dependencies. And it seems that it’s enough to make the parent style dependent on the bootstrap style, which is also enqueued by Newspaper’s function.php. So, this code works for me now:

add_action('wp_enqueue_scripts', 'enqueue_parent_theme_style' );
function enqueue_parent_theme_style() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css', array('td-bootstrap') );
}

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.