Can I convert bootstrap classes to pure css?
Something like convert 'class="container-sm' to normal css.
I would like to know the CSS that contains the "container-sm" class in bootstrap
<div class="container-sm">100% wide until small breakpoint</div>
<div class="container-md">100% wide until medium breakpoint</div>
Bootstrap classes are CSS so there is nothing to convert.
My best guess is that you want to see the actual CSS rules of each class to understand what they do.
If that is the case, you can just right click and inspect the element you want. You will see a pane with all the css rules applied to the element you want to see.
Related
My problem is that I want to style my CSS page to make it looks like in "print preview". I used #media print CSS to make rules for printing. But I don't know exactly how to design my HTML page, for example: I set div size as A4 format, but if text inside this div is longer than A4 height how can I move some part of div to other "A4" div?
If text inside this div is longer than a4 height how can I move some part of div to other "a4" div?
You need to use page-break in CSS to make the content come correctly against the pages. There are two properties, which help you achieve this: page-break-after, page-break-before, page-break-inside. You can refer to MDN for more information about that.
I don't know exactly how to design my HTML page.
Make sure you don't use position, and float inside your pages. That's a good way. Keep only those that are required and use display: none to hide others.
At the moment I've been using the css line-height property in the parent div to increase the line spacing, and this works fine for the text, and even <input> elements. The only problem is any custom controls like the JQuery spinner or Chosen will try to fill up this entire line height (as they're set to display:inline-block)
Currently it appears like this:
How do I get these widgets to appear the same height as the text? I mean the default <input> elements can, so surely it's possible?
Find the element class/id and on your own style.css you can customize it's property with !important But use of !important is not considered as a good practice. (But if there's issue on one-or-two places, i think that is Ok)
Another way can be, why not making changes on jquery ui css that you are linked to.
I am trying to use the Twitter Bootstrap Carousel
is there any way not display the vertical grey bars at both the sides of the carousel?
You can do it with CSS
.carousel-control.left,
.carousel-control.right {
background-image: none
}
jsFiddle
How to do it yourself:
Go to a site that has the bootstrap carousel. I went to the documentation page
In Chrome (or whatever browser you like) use Inspect Element to see a list of all the matched CSS rules. Something is giving it that styling, and it's going to have to live here.
Find one that looks like the culrprit and uncheck the box to see if removing that style makes a difference
Note: You shouldn't change bootstrap.css, but you can override it by placing your changed css later. If it doesn't work, try !important
Best of luck!
you can change "boostrap.css" file..(2.3.2/assets/css/bootstrap.css)
you can find and "#999" (color code) replace anything you want or delete.
I've been trying to figure out a way to style individual panels or gui's using Dat.gui.
What is the best way to do this? I could search for panel names in the DOM then apply the style but it seems like an overly complicated solution.
From the looks of this example you could use the CSS selector .dg.main to start, that is the panel container element.
You could use CSS to style the elements, or jQuery or similar to manipulate the DOM.
What would be the points you validate when considering a new menu for your website?
Why should i choose complete CSS based menu ?
Why should i choose Javascript/CSS based menu ?
whats is the benefit in choosing either of them?
Is CSS menu old ? or is it limited in features! I dont think CSS menu is old as i still a pick a thousand web2.0 site using complete CSS menu (No javascript to control its dropdowns).
I default to pure CSS unless there is something I can't pull off with CSS animations, then I'll consider switching to JS. It's pretty rare you'll need the JS unless you need some fancy timed animation across multiple elements or something wacky that CSS animations can't handle.
Using pure CSS the menu still works even when the client has JS disabled. Plus with pure CSS it's usually less code, which is always nice.
A nice way to look at it: would you use JS to change the color of a link when you hover over it, or CSS? This is just a more complicated, but usually similar, question.
CSS controls the layout (and limited interactions, such as hover) while Javascript controls logic.
If you don't need any logic in your menu (such as displaying a hidden div element as a submenu), then using CSS on its own is just fine.