Solved

adding custom css bootstrap

Posted on 2013-05-27
2
381 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 9

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
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…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now