Solved

adding custom css bootstrap

Posted on 2013-05-27
2
386 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 500 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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

622 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