Hey everyone!
So I had a question a few days back that I couldn't find the answer to: why was the content appearing weird and not formatted correctly when I used jQuery's .load() function to load another .HTML page from my directory? The strange thing was that Bootstrap buttons were showing up perfectly fine.
After some research, I finally figured out what was happening, although I'm still unsure about the reasoning behind it. When I used jQuery load()
method like this:
$("#mainmenu").load("ready.html");
to load another HTML page into a div named mainmenu
, I noticed that some content was being affected by grid-framework.less:18
:
.row {
/* margin-right: -15px; */
/* margin-left: -15px; */
}
Additionally, certain h1/h2 tags were getting messed up by type.less from Bootstrap, among others. These LESS files seemed to be overriding my CSS file and standard Bootstrap styling, which was confusing. Interestingly, everything seemed fine in the div before the load()
function was called.
Right now, I'm using Bootstrap's CDN to link the framework. Do I need to download Bootstrap, locate these LESS files, and remove the problematic code to resolve the issue? And more importantly, why are these LESS files taking precedence over everything else?