The mdl-data-table--selectable table can't change the line-height in CSS? - material-design-lite

The mdl-data-table--selectable table can't change the line-height in CSS.
So how to make rows shorter?

You can change the height. Issue is mostly with the padding around the checkboxes. This worked for me to reduce the line height:
.mdl-data-table--selectable tr,.mdl-data-table--selectable td, .mdl-data-table--selectable th{
height: 15px!important;
padding: 0em;
padding-left: 24px;
}
However you'll need to manually clean up the presentation a bit if you really want to do this because it screws with the mdl layout.

Related

How do I make items in an Ionic list smaller (less tall)?

The items in a standard ion-list of ion-items are too big for my app. How do I make them vertically smaller/shorter?
It seems that trying to modify the margin properties of the .item class yields results that are, well, complete nonsense. This is not the answer. Modifying the padding properties of the same seems not to do anything. Also not the answer.
You need to modify the properties of the .item-content class.
The following code will reduce the padding on list items from the comically large 16px default to a more manageable 12px.
.item-content {
padding-top: 12px;
padding-bottom: 12px;
margin-top: -4px;
margin-bottom: -4px;
height: 70px;
}

Searchbar width in navbar bootstrap + offset

I would like to raise the width of my input type text in my boostrap navbar, and keep it responsive, but don't know how to do that . Seem to be completely impossible
Here is the sample of the code
http://www.bootply.com/klx0LnIMF9
I used to watched this post:
Bootstrap 3 - How to maximize input width inside navbar
In fact the code given by Bass Jobsen is the exact same code , somehow it 's workinb for bootstrap 3.0.0 but not for bootstrap 3.2.0
If anyone can help, it could be great,
Thanks in advance
Anselme
well, it's not the same solution you have in that link, just a quick fix I've made for this question and may need a few adjustments to fit your needs, but take a look at your forked example
Only one tiny change in your HTML (that inline style you don't need at all and it's more annoying than useful) and a bit of CSS as follows:
.navbar-form {
padding:0;
margin-right: 0px;
margin-left: 0px;
display: inline-block;
width: 50% !important;
border: 0px none;
}
.form-group {
width:100%;
}
.input-group-addon:first-child {
border-right: 0px none;
width: 30px !important;
}
.navbar-form .input-group {
vertical-align: middle;
display: inline-table;
width: 100%;
}
As you'll probably notice, I just get rid of the float and replace elements properties by inline. Once done, I have the ability to better play with responsive widths. You'll probably notice the !important definitions. You may or may not need them (Bootstrap has a few !important declarations, so be sure to test), but basically I'm applying this to ALL sizes, so you may probably want to change that width: 50% !important; in .navbar-form to width: 100% !important; for 768px and under, but anyways, here you have the tools to play around and adjust as you like

Responsive site giving me trouble, chrome positioning a div in a different area?

http://www.remotegoatdesign.com/sayhey/pages/edit-valentines-marc-card.html
Doing this site for an assignment due tomorrow. In the proccess of making it responsive.
I am having an issue with the last color block, although its put into its container using percentages, it keeps moving out. In chrome its outside it straight away, whereas in Firefox its only when I resize. Although the difference is only a few pixels, so I'd assume its to do with the monitor size.
Any ideas guys? I'm stumped.
Try add this code snippet into your css file.
#tab-1 > div > div
{
width: 8%;
}
You can change the width.
Good Luck!!
Try using property " display:inline-table " for the class color_container
and give margin for the smaller color divs for space inbetween
try putting slightly smaller percentages(in the color block) and test it until it looks good. also it fits right in wider monitors as you say, because you have one css, that is best for wide screens. the point of responsive design is to have more than one media queries if the one you have breaks the design in smaller screens. so either make the color blocks really small, or myou should make more media queries
Your issue here is display: inline-block;. When you use it, it adds an extra space between elements. If you want to sort out this, you have 2 fixes:
a) negative margin-right
.box {
display: inline-block;
width: 8.74%;
height: 100%;
margin-right: -4px;
}
b) font-size: 0; on the container and default font-size on the elements inside
.color_container {
width: 98%;
height: 60px;
min-height: 60px;
padding: 5px;
background-color: #fff;
font-size: 0;
}
.box {
display: inline-block;
width: 8.74%;
height: 100%;
font-size: 1em; /* or what is your default font-size */
}

How to display text background color beyond text?

I have run into a problem, where background of a text field does not cover the whole element, but only extends as far as the text does. An example.
I'd like the background color to extend throughout the element. Like this:
Edit. I am interested in a CSS solution, which works with all screen sizes. Just writing height: n px would not work.
Just changed display:table to display:block in class middlearea - and it now seems to work as you wanted it to.
Edit: And yes of course deleting display property at all will lead to the same result.
See below, as I change height:, the background also changes:
div.text {
position: relative;
background-color: #DFDFDF;
opacity: 0.8;
padding-top: 8px;
padding-right: 52px;
padding-bottom: 8px;
padding-left: 12px;
font-family: arial;
text-align: justify;
font-size: 0.9em;
height: 150px; <--- work with this 656px seems perfect.
background-size: 100%;
}
I don't know if I fully understand your question, but maybe you could set a min-height property to your container, so that no matter how short the text is, it will always display a minimun height.

Styling Text In Div

I'm trying to figure out how to get the text No Managers in Database vertically positioned in the containing div like the input elements are.
I tried adding padding and margin, but they didn't work. Any thoughts on how this could be accomplished?
http://jsfiddle.net/SKTRn/
CSS
#none {
display: block;
font-size: 12px;
margin: 7px 0;
padding: 5px 0;
}
Basically, you just have to add display: block; to your CSS. I just took the liberty of changing the other styles to line things up a little better (and get the font the same size as the inputs).

Resources