I dont have enough points to post a picture, but I am working on a project and the input text fields are way smaller than it is on the http://twitter.github.com/bootstrap/index.html site. I have <!DOCTYPE html> in the application.html.erb, but it still dont work.
Anyone got any idea on what the problem might be?
The width of textbox may be affected by the parent html tag's width. I cant be sure without seeing the html mark-up. The default width is defined in bootstrap.css for input text field. You can override this width by including desired span classes to the control like this..
<input type="text" class="span3" />
<input type="text" class="span12" />
It would be better to use the chrome inspector to check for the CSS rule for the input field. If that doesnt work, you can add a class or id to the input fields you need and then in a custom CSS file you can set the width of the class or id. This will change the size of your input field. Just make sure that your custom css file comes after the bootstrap css file.
Related
Angular Material form fields are potentially very convenient because they add a bunch of classes to the surrounding element depending on whether the field is selected, empty, filled, etc. I want to use these classes to customize the style of the label and other custom elements placed inside the field container (example: making the label change color when the input is focused).
The problem is that Angular Material also adds a bunch of other properties, styles and elements that I don't want to deal with. Even if I add floatLabel="never" and floatPlaceholder="never", the placeholder is still removed from the input and turned into a label, which is positioned relative to the entire container. If I place other elements inside the mat-form-field element (like a regular label), this messes up the positioning of the placeholder-turned-label, causing it to appear outside the input.
Is there any way I can make Angular Material not turn the placeholder into a label, but just leave it as a normal placeholder?
So I wasn't able to actually fix it properly, but I was able to get around the issue by adding styles to undo the style changes that Angular adds.
mat-form-field.mat-form-field-hide-placeholder .mat-input-element::placeholder{
color: #ccc !important;
-webkit-text-fill-color: #ccc !important;
}
mat-form-field.mat-form-field-hide-placeholder .mat-form-field-label-wrapper{
display: none;
}
It would be nicer if there was a way to not have the .mat-form-field-hide-placeholder class added in the first place, but until someone figures this out this will have to do.
Turns out all you need to do is add appearance="none" to the field tag, e.g.:
<mat-form-field appearance="none">
<input matInput [(ngModel)]="email" placeholder="Email">
</mat-form-field>
I want to handle slider with hidden check box for scripts using watir.
Can any one help me to resolve this issue?
This would be more like visibility: hidden
Try setting the checkbox's opacity to 0. If you want the checkbox to be out of flow try position:absolute and offset the checkbox by a large number.
HTML
<label class="checkbox"><input type="checkbox" value="valueofcheckbox" checked="checked" style="opacity:0; position:absolute; left:9999px;">Option Text</label>
How many checkboxes do you have at this page? If there is only one then this might work:
browser.checkbox(attribute: attribute-value).when_present.set
I used animated input from W3 CSS. It takes 100% of the width when I click on it, but I only want it to take up 75% of the width when I click on it.
The code is:
<input class="w3-input w3-border w3-animate-input" type="text" style="width:30%">
The property you are trying to change is controlled by a pseudo-class. You need to change the width of w3-animate-input:focus {width:75%;}. You must add this to your code. You can add this to
the head section of your page between <script> tag.
the w3.css file if you are hosting it on your website.
I've created a jira custom field plugin to appear at issue view screen only (as there will be predeined calcualtion on field description-javascript).
But this does not appear at issue view screen what i need even though, assgined hard coded values in vm file.
when create "edit.vm" then it appears on edit issue screen and after assigning the value to field , it could appear in issue view screen but, without edit template , its not working and unable to see in issue view screen.
Below is atlassina-plugin xml stuff:
<customfield-type name="Summary field" i18n-name-key="cascading-summary-field.name" key="cascading-summary-field" class="com.company.plugins.jira.customfields.CascadingSummaryCustomField">
<description key="cascading-summary-field.description">The cascading summary field to allow multiple summary fields using five text box and description javascript to write related text to appear in summary field.</description>
View template as below: (with hard coded value specified though unable to appear this on issue view screen).
<span>$<input type="text" name="${customField.id}:input1" id="${customField.id}:input1" value="#if($input1)$input1#end" style="border: 0px;width:59px;margin-left:1px;"/></span>
<span>$</text><input type="text" name="${customField.id}:input2" id="${customField.id}:input2" value="3" style="border: 0px;width:59px;margin-left:1px;"/></span>
<span>$</text><input type="text" name="3" id="${customField.id}:input3" value="0" style="border: 0px;width:59px;margin-left:1px;"/></span>
//also, tried by just keeping <span>some value</span>
how it could resolve ?
As found, field to appear at view screen, there must have require "Edit" template.
so, it resolved by creating an edit template.
Other wise, have to follow achieve by preparing dynamic object through jquery under CUSTOM FIELD'S description field. (first found, related position to append through firebug and append that created object inside "Custom field >> description".
Thanks
I define a label and set its value
<bbox>
<label id="notify" value="Test"/>
</bbox>
The width of the label is fix so if the value (text) is longer then the width
I want the line to break. I tried it with css doing
word-wrap:break word;
But this does not work. Is there a XUL element that provides such a feature or do you know an other technique?
You can do this with either the <label> or the <description> element, but you need to use its textContent rather than its value.
<label id="notify">Test</label>
I believe a xul description is what you want.