How to style "sort by" dropdown box in Magento - magento

I'm trying to style the "sort by" dropdown box on the magento products grid page using css.
I would consider myself pretty good at targeting and styling elements with css , but for the life of me i cannot find or style this dropdown box.
I have got as far as styling the backgound using input.input-text:focus,select:focus,textarea:focus { background-color:#FFCCFF; } line 182 in styles.css. but cant find the hover element (blue color) on mouse over..?
I've tried stying "select option" and all sorts of combinations of :focus and :hover
I've also looked at some javascript but cant see anything there..?
Any help would be appreciated the live url is http://www.magento.ledgemonkey.com/index.php/shoes.html?dir=asc&order=price

I don't see a :hover rule set for form elements like this... so just add another rule.
input.input-text:hover,select:hover,textarea:hover { background-color:#FFCCFF; }
I get that there's a hesitation to modify the imposing magento style sheet too much. But its yours. go nuts.

Related

Want to alter the look of the ckeditor dropdown menu "Styles"

Using ckeditor in Drupal 8. The dropdown menu itself is too small and short and the type inside is too large. How can I actually change the formatting of the Styles dropdown menu itself?
I'm not sure if you need to do anything special inside Drupal 8 however from CKEditor point of view you need to change CSS classes responsible for dropdowns.
Below are classess used by dropdowns in CKEditor 4.x for default skin.
Dropdown buttons on toolbar:
.cke_combo__font .cke_combo_text
.cke_combo__fontsize .cke_combo_text
.cke_combo__format .cke_combo_text
.cke_combo__style .cke_combo_text
Dropdown panels:
.cke_combopanel__font
.cke_combopanel__fontsize
.cke_combopanel__format
.cke_combopanel__styles
To resize editor droprown button and panel for e.g. Format, please add the following rules in your page CSS file:
.cke_combo__format .cke_combo_text{
width:150px !important;
}
.cke_combopanel__format {
width:250px !important;
}
Since Toolbar is a part of main page, these rules can be included in head section of your HTML page, can be put in external CSS file which is then imported to your HTML page (with the help of link tag) or can be added in editor CSS skin files directly e.g. in editor.css although that last method will be problematic in case of editor upgrades so I don't recommend it.
Drupal 8 / 9: You can define a stylesheet for CKEditor in your (Admin-)Theme to override the appearance of the editor.
First add a new CSS-file (e.g. css/ckeditor-override.css) to your admin-theme.
Add the following line to your admin-(sub)theme's info-file (e.g. myadmintheme.info.yml):
ckeditor_stylesheets:
- css/ckeditor-override.css
Then you can change the appearance of the editors – see hints of j.swiderski answer – for example:
.cke_combopanel {
width:200px !important;
}
.cke_panel_list .mystyle {
font-size: 1em !important;
}
If your stylings do not work, have a look into your theme: Maybe it styles the editor, too, and overrides your stylings?
Some themes – like "Gin" – make it easy and provide a css-file for custom overrides. Then simply put your style-overrides for the editor there.
If you don't want to create a subtheme you can try Asset Injector-Module.

QtComboBox drop-down image disable from code

I have found lots of ways to control a QtComboBox using style sheets, but not directly from code (well, you can use the setStyleSheet method).
I have a requirement to disable all widgets when a page is disabled, and I can accomplish that requirement. The problem is trying to make a QtComboBox look disabled (also a requirement).
Is there a way to change the QtComBox drop-down arrow to another image in code?
I have found that sometimes you have to implement an entire style sheet in Qt whenever you want to change one part of the widget.
Do I have to implement a disabled style sheet in code and use the setStyleSheet method?
And then, do I have to re-implement an enabled style sheet when the page is re-enabled?
It seems there should be something like: myComboBox->setDownArrowImage(url . . .);
Am I missing something?
Thanks.
Use pseudo states.
Stylesheet example:
QComboBox:enabled {color: red;}
QComboBox::down-arrow:enabled {image:url(:/images/downarrow.png);}
QComboBox::disabled {color: white;}
QComboBox::down-arrow:disabled {image:url(:/images/downarrowdisabled.png);}

Ruby on Rails: gem or plugin for definitions on a medical form

I am creating a website with a rather lengthy medical questionnaire. The users/patients need to be able to hover or click on a medical term and see the definition.
What are ways to accomplish this in RoR? There are similar plugins for WordPress, but I haven't found any in Rails.
My idea is have a Term model, that has attributes "word" and a "definition". Then in my layouts, I have to somehow scan the page and output the definition.
There are multiple approaches. I use jquery-tooltip. I'm in the same boat, instead of medical forms in my case it's insurance forms.
I checked out a few different approaches. I really like the tooltip feature coming soon to jquery-ui 1.9. Until it's officially released, I'm using jquery-tooltip.
They both work the same, give an element a title:
<div id='q12', title='This is number 12'>
What is this?
</div>
Then
$('#q12').tooltip
If the only reason you ever give your elements a Title is to create a tooltip, then you can just use something like:
$("[title]").tooltip({ position: "center left", predelay:500 });
Then every element with a title defined will show your stylized tooltip when the element is hovered over.
Why not use Twitter's Bootstrap framework.
Modal
These can be customized with images and any other content that you need.
Tooltips
Mainly for small snippets of text.
Medical Term
Popovers
Can contain more information then tooltips, but not as versatile as a Modal.
You can find more information on using it in Rails 3.0/3.2 here.

How to put divs for text field and button in one line for mailchimp signup form that is in a table?

I've been trying to amend the code provided by Mailchimp which is included on a site I'm developing for the mailing list form.
Basically the code is included within a table and the Mailchimp code is in one cell of the table. The content is title, box to enter email address and "Submit" button. I would like to amend the code so that the contents of the cell are all on one line rather than under each other as is the current case.
The code and CSS can be found here http://jsfiddle.net/surfersteve1970/x9QLP/
Hopefully I've just done something stupid, as is often the case, but after hitting my head on my desk for the last hour I thought it best to try and ask for some help rather than cause further brain damage.
Thanks in anticipation of any help.
Steve
http://jsfiddle.net/iphipps/CLFBj/1/
Both the email and button inputs were being displayed as block and not floated or displayed inline. The code below worked for me.
#mc_embed_signup input.email{
display:inline-block;
}
#mc_embed_signup input.button {
display:inline-block;
}
Note: in the attached jsfiddle, I changed the display on both selectors, then added the code below after a comment. For some reason jsfiddle doesn't seem to like css cascaded overrides.

How to display the “Menu Title” in Joomla 2.5

I’m trying to display the menu title text (example “Home”) in the header area of my Joomla 2.5 website.
Joomla’s default (when activated) is to place it in the Component area.
I’m not sure the best way to accomplish this. By default Joomla wraps the menu title with an H1 tag but doesn’t wrap it with a div and class.
The ways I’ve thought might be best to do this are:
Somehow wrap all menu titles with a div and class so I could reposition them up into the header with css .
Add some php code to my template. Something like:
php
$menuTitle = $this->params->get(‘fieldNameOfMenuTitle’);
php
echo = $menuTitle;
Any ideas, suggestions, or answers would greatly appreciated
Thanks
Never found an exact answer but found a work around.
Used a modified version of the below demo/plug-in to create a custom field (named it: "Title that displays on the Web Page") in the articles menu. By default, the table that is created and displayed in the web page is in the component area and is wrapped in a w/ a class. Repositioned the with CSS up into the header/banner area.
http://docs.joomla.org/Adding_custom_fields_to_the_article_component

Resources