Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

adding custom css bootstrap

Posted on 2013-05-27
2
Medium Priority
?
387 Views
Last Modified: 2013-05-28
Hi,

I have read conflicting opinions about how to add custom made css to bootstrap.
What I do is include my custom  stylesheet last. Then if I want a custom anything eg say a menu then I add new classes/id's and work with them in a new row.

Is this the correct method and I would add my css code in a custom stylesheet?

<div class="row-fluid">
    
     <div class='span12 main'>
      <h2>Main menu Section sd fs df sdf sd f sfsdfsdfsdfdsfsd dfvdf fdfg dfg dfg dfg df</h2>
     </div>

Open in new window

0
Comment
Question by:jagguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39200154
Your code does not show your own custom stylesheet, but yes, create your own custom stylesheet and place it below the bootstrap. I do this and it works fine. It is better this way as bootstrap may change and it keeps everything in one spot.   If you have a large site with a lot of traffic, it may be good to place your custom css on the same sheet below the bootstrap css.  The reason is there is one less call to the server.  You should also compress the css.  While you are in the construction phase, it is easier to keep it separate and not compressed.
0
 
LVL 10

Expert Comment

by:Ishaan Rawat
ID: 39200328
Or you can add !important to your styles... like this..

Example...

#ID{
       width: 200px !important;
       height: 200px !important;
}

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question