Skip to main content
LGMTL
Inspiring
July 4, 2017
Answered

Margin issue and CSS selectors

  • July 4, 2017
  • 1 reply
  • 1253 views

Hello,

Often times I need to spend lots of time with Firebug to identify the class selectors responsible for some display issues, for example I have a page that is 15px wider than it should be and so the browser displays the horizontal scroll bar at the bottom.  http://prntscr.com/fraoh6

Link here: Supreme - Find a Dealer

I was able to fix most of them by selecting the item within Dreamweaver and then creating a specific style for that combo selector but is that the best way or is there a better way or best practice I should adopt instead?

I've got for all the divs:

* {

box-sizing: border-box;

}

So I'm guessing it's some embedded div that's causing the extra width but I'm trying to learn the best way to identify and fix this issue.  Thanks for your help.

Brandon

    This topic has been closed for replies.
    Correct answer osgood_

    container-master is the cause of your problem on the 'Contact Us' page.

    <div class="container-fluid container-master">

    That's the problem when you use Bootstrap it is not very well written and uses rather 'strange ways' to do ordinary things. In this case it puts some werid css on the 'container-fluid' css to position it. If you mess with that, like setting the container-master padding to 0 as you have done in your own  css file that will cause 'container-fluid' to fail according to how it should work in the Bootstrap spec.

    This is the precise reason I avoid frameworks like the plague because you end up spending more time reverse-engineering (what's the point) and troubleshooting css that you did not write and know nothing about.

    You should really clean up all the repeated code in your pages, as a result of it being in your include files, that will not help when it come to solving issues. Spend a bit more time learning to code and a bit less time visually designing, which you are obviously good at, and it will all be a bit less frustrating. Find a balance.

    1 reply

    BenPleysier
    Community Expert
    Community Expert
    July 4, 2017

    I think that the problem comes from your iframe(s) as in

    <iframe name="dealers" class="autoHeight" width="100%" height="800px" align="center" frameborder="no" scrolling="auto" src="http://supremem.com/locator/"></iframe></div>

    See here for an explanation when using dimensions HTML iframe width Attribute

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    LGMTL
    LGMTLAuthor
    Inspiring
    July 4, 2017

    Thanks for your reply Ben, I'll check that out.  It also happens on this page without an iFrame. Meaning the horizontal scroll bar appears due to width.  I've been doing a process of elimination, till the issue is gone to try to isolate the exact cause but I've found that method doesn't always work the way you expect.

    Supreme - Contact Us

    Brandon

    BenPleysier
    Community Expert
    Community Expert
    July 4, 2017

    That page is a bit of a mess. Line 257 contains a rogue </p> and from line 264 on, it doesn't make sense.

    Please fix with the help of Showing results for http://www.supremem.com/new_2017/contact_us.php - Nu Html Checker

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!