I am trying to create a DIV generator using PHP, jQuery and Bootstrap for the dashboard. In the dashboard I have some inputs and, using jQuery, I am manipulating the style and the content of the DIV based on the input values, so it displays a preview of the DIV before passing the values to PHP. The problem is that Bootstrap puts some of its own CSS on my div and it doesn't look like the end result.
How it looks on a non-Bootstrap page:
How it looks on the dashboard:
Here is the CSS of the DIV (apart from what's already in the style
attribute:
.rectangular{
float:left;
width:40%;
padding-left:10%;
padding-bottom:25px;
}
.rectangular_1 {
height: 10px;
position: relative;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
width: 100%;
-webkit-box-shadow: inset 0 -1px 1px rgba(255,255,255,0.3);
-moz-box-shadow : inset 0 -1px 1px rgba(255,255,255,0.3);
box-shadow : inset 0 -1px 1px rgba(255,255,255,0.3);
}
.rectangular_1 > span {
display: block;
height: 100%;
-webkit-border-top-right-radius: 2px;
-webkit-border-bottom-right-radius: 2px;
-moz-border-radius-topright: 2px;
-moz-border-radius-bottomright: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
-webkit-border-top-left-radius: 2px;
-webkit-border-bottom-left-radius: 2px;
-moz-border-radius-topleft: 2px;
-moz-border-radius-bottomleft: 2px;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
background: rgb(122,188,255);
position: relative;
overflow: hidden;
}
.spoll { -webkit-box-sizing: border-box;;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
padding-top: 5px;
}
And the HTML:
<div class="spoll" style="width: 300px; border: 1px solid #0099cc; border-radius: 0px; color: #0099cc; background-color: #FFF;">
<p id="prevTitle"><b>Do you wanna' have some fun?</b></p>
<p id="prevTopic" style="font-size: 13px;"></p>
<p>First</p>
<div class="rectangular_1" style="border: 1px solid #6699CC"> <span style="width:60%; background: #6699CC"></span> </div>
<p>Second</p>
<div class="rectangular_1" style="border: 1px solid #6699CC"> <span style="width:60%; background: #6699CC"></span> </div>
<p>Blah</p>
<div class="rectangular_1" style="border: 1px solid #6699CC"> <span style="width:60%; background: #6699CC"></span> </div>
<br>
<br>
<input id="submit" name="submit" type="submit" value="Vote" style="border-radius: 5px; border: none; padding: 10px; width: 100%; margin: auto; background-color: #0099cc; color:#FFF;" />
</div>
I can't use an IFrame because I need to update the DIV with the form values, so... any suggestion?
I've tried to use the selected answer from here inside the header after the Bootstrap's css <link src="">
part and before the CSS I've shown you, but it didn't work.