To steer clear of having to use !important
(which I strongly dislike unless it's absolutely necessary as it contradicts the fundamental concept and approach of Cascading Style Sheets!), consider refining the styling of span9
with more specific parent/child selectors...
Is there a particular parent class that can be utilized? Even if it's within the body tag? This will take precedence over BootStrap's default styling.
CSS:
.parentclass .span9 {
width: 700px;
}
Additionally, it is crucial to ensure that your custom CSS file is linked AFTER your BootStrap files.
EDIT - To make sure your updated style is compatible with BootStrap's defined viewports, utilize @media
queries in this manner:
@media (min-width: 1200px) {
.parentclass .span9 {
width: 700px;
}
}
Keep in mind that BootStrap 2 also includes the following media query which affects span
classes for the specified sizes:
@media (min-width: 768px) and (max-width: 979px)
Within this @media query, .span9
adjusts to 538px, so make any necessary adjustments... Just follow the same approach:
@media (min-width: 768px) and (max-width: 979px) {
.parentclass .span9 {
width: XXXpx;
}
}
For dimensions below 767px, span classes occupy the entire width (100%), eliminating the need for further modifications...