I have two divs centred side-by-side using bootstrap. One div is text-right
aligned and the other text-left
. I'm trying to get it so that these become centred on top of each other when the page becomes to small to view them side by side. I have tried using @media
rule in CSS to deal with this but with no luck. Any suggestions? The HTML so far looks like this:
<div class="container-fluid">
<div class="col-md-3 col-md-offset-3 text-right">
<p class="summary">Some summary text</p>
</div>
<div class="col-md-3 text-left">
<p class="description">An extended description</p>
</div>
</div>
UPDATE!
The CSS relating to the two divs:
/* Summary text */
.summary {
font-family: 'Stint Ultra Expanded', cursive;
font-size: 1.5em;
color: #ffffff;
text-transform: uppercase;
opacity: 0.8;
}
/* Description text */
.description {
font-family: 'Slabo 13px', serif;
font-size: 1.1em;
color: #ffffff;
opacity: 0.8;
}
@media screen and (max-width: 300px) {
.summary,
.description {
text-align: center;
}
}