Solved

adding custom css bootstrap

Posted on 2013-05-27
2
382 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
2 Comments
 
LVL 52

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular JS Route 3 68
css icomoons will not display on page 14 30
Width of Page is Affecting Side Menu 6 24
Border and image sizing 5 17
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

786 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