Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Which element is causing the horizontal scroll?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #165472
    Joanne Masterson
    Participant

    Hi there
    I’ve used WordPress-bootstrap theme to create a child theme here:
    http://potentio.us

    The problem is that there is a horizontal scrollbar when I shrink the site to 400px wide (to test for smartphones).

    I can not for the life of me figure out which element is causing the horizontal scroll. There is none at the parent theme site:
    http://320press.com/wpbs/

    Can anyone shed any light?

    I have been examining each division for hours and I don’t see it.

    Thanks for any help.

    Joanne

    #165473
    Steven Crader
    Participant

    Nothing immediately revealed itself as the problem. I did run it through the HTML Validator and it seems that there are some stray div tags that may or may not be closed at the right location. Here is the Validator output.

    #165474
    Atelierbram
    Participant

    There’s also this horizontal scrollbar on larger screen, apparently caused by the bootstrap negative left and right margin on .row, …

    One thing you could do to eliminate potential causes is to remove a few stray </div> tags, ( easiest to use W3C’s validator to check on that ).

    #166340
    Joanne Masterson
    Participant

    Thanks everyone.

    I saw the validation problems with the divs -fixed those!

    What do you use to check 320-wide screens?

    Thanks for your advice

    Joanne

    #166347
    Alan C
    Participant

    Howdy,

    Poking around if you remove the margin-right: -15px from both .row and .navbar-nav it fixes it right up for me on a 1600×900 screen. No scroll bar even as I size down.

    .row is the major culprit that actually does like 90% of the fixing, as you size down you get a small bar but not at any recognized resolutions outside of 768 (so some tablets in portrait and computers from the 90s). The margin on .navbar-nav fixes the sizing down issue.

    #166353
    Paulie_D
    Member

    What do you use to check 320-wide screens?

    Chrome won’t reduce to that size BUT you can use Firefox (which will) or the Chrome Developer tools to emulate a screen that size.

    TBH…I don’t think there are many devices that small these days. 480px generally seems to be the minimum.

    #166357
    Senff
    Participant

    What do you use to check 320-wide screens?

    http://www.senff.com/front-end/you-already-have-a-retina-screen-emulator/

    Chrome won’t reduce to that size BUT you can use Firefox (which will) or the Chrome Developer tools to emulate a screen that size.

    Huh? Of course it does. The smallest window I can make with Chrome is 249 pixels wide.

    #166362
    Paulie_D
    Member

    Huh? Of course it does. The smallest window I can make with Chrome is 249 pixels wide.

    Hmmm…mine is c.500px

    Aha…hid Bookmarks and Extension icons and that fixed it.

    #166369
    Steven Crader
    Participant

    You can also use the Mobile Emulation features of the Chrome Dev tools if you don’t want to keep resizing the actual window.

    #202505
    chromium24
    Participant

    @AlanD
    Thank you for your help! By setting the margin-right to 0 for .row and .navbar worked perfectly. I’d tried other methods suggested and nothing worked until I found your solution.

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