It is very easy with links and images. One could just specify title="Something" to get a nice tooltip over an element. But somehow I don't see any convenient way to do the same to a button. Seems like HTML itself miss this option at the first place.
But maybe there is at least a handy workaround for that?
Jesse Gumm from nitrogenweb googlegroup shared a nice way to do this
#button{text="Submit",postback=whatever,actions="obj('me').title=\"Some title\""}
Related
Let's say I have the following section on a form
Form Section:
Data:_____________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
and I want to be able to insert {{ data }} into the section while keeping every line (even if it's unused). I'm doing this for work to replicate an old form. This form has to be identical and that's why I can't simply do something like:
<u>{{ data }}<u>
Thanks in advance for any and all help!
There seem to be a couple of options here;
Hacky: Use multiple text inputs. Style them to have a solid bottom border (as the underline) and use a bit of javascript to handle moving between them on word wrap/arrow key movement. Downside: you'll miss something like handling text readers properly, obscure keyboard shortcuts, etc... Also, while pasting is fairly easy, copying would be a pain.
Use a textarea with a background-image with the lines. This relies on you locking down the font size/line spacing to look right
Html5: look into using contenteditable attribute. you should be able to replicate the appearance fairly easily using css and divs/spans. Then make the right one editable
This post might be helpful. How to underline blank space in CSS?
In their example, you would put your template code in the first span.
I have a small problem with an HTML select:
<select>
<option>...</option>
<option>...</option>
<option>...</option>
</select>
By default all the options will be shown underneath the select field and I can't seem to change their direction. What I need is to show up over the select field instead of underneath.
How would that be possible?
That's pretty much impossible (without custom JavaScript-based elements) since select and option are elements built-in to the OS and browser.
One way to think about it: all drop-down menus are styled so that all listings are below the field. If you make yours different, some people may be confused, and that's not a good thing.
It's not possible dude, sory... I have done the research for you but nothing appears to be a solution to your problem...
Seeing it the good way, you might be the one that comes up with the JavaScript code for this and post the solution on your own question, and answer the question for future users that need the same stuff
Keep moving and you'll get it. Good luck
You could try to use this in your CSS:
direction: rtl;
You can do it inline for your select or give it a class/id. I was able to reverse the direction of my select menu by using this. I had to change some of the styles though because it pushed my text to the right a bunch. See this answer.
Hope that helps!
I have a situation that looks something like this
<div class="x" href="foo">
<div class="y" href="bar"></div>
<div class="z"></div>
<div class="y" href="baz"></div>
fooz
</div>
x is a badge that should be clickable. The problem is that the badge also contains links that also should be clickable. In addition y and z are clickable. Unfortunately clicking the child links only leads to the outter x being pressed. How should I best handle something like this?
Continuing from my previous comment (assuming my understanding of your scenario was correct), here is your solution: http://jsfiddle.net/chricholson/7yzxQ/12/
It involves using stopPropagation to prevent the click being detected up the tree structure http://api.jquery.com/event.stopPropagation/
This doesn't work and it's not valid html, because nested a-elements are not allowed. For a solution more information is needed.
I think that you should not place <a> tags into another <a>. The solution here would be either using javascript, and event bubbling or you should separate the links and place/style them in a way where you see one integral badge. In the html you would actually build it from separated elements.
Personally I would go for the javascript way, as it is much more straightforward.
I would like to add an extra border (thick) on my controls like here: http://tickspot.com/screenshots/
As we see in this link, the combos list and textbox have a blue tick border.
How can I achieve this without too much effort?
Thank you.
A CSS only solution might be to use both border and outline styles : http://jsfiddle.net/RyJzC/
(But remember outline is used to give an indication that an element has focus so make sure you take this behaviour into account if you do style outline)
Not all form elements properly support css styling. You could probably find some styles that work across the board, but it might take some work.
The easier option to get consistency is to wrap your controls in a <span class='control'></span> The downside to this method is that you have to add extra markup. You could give all the elements on your page class='addBorder' or something similar and then use JavaScript to find them and wrap them. That'd be a very unobtrusive method. Comment if you need help on implementing this and I'd be happy to help.
You may nest your elements and give the outer element the border and the padding.
here you'll get an impression: http://jsfiddle.net/jy92c/1/
Is it possible to remove the blue "v" icon on a html thing?
Or how can I make it disappear? Or can I change it?
If I want to remove it what are my options?
<select> is not styled by CSS, it's styled by the operating system. You can make it look the way you want by using an CSS+HTML+JavaScript replacement, but that requires a plug-in or a bit of code.
You can use Uniform to replace your <select> elements with themable JavaScript-based equivalents. Uniform is nice because it degrades gracefully to your original <select> box in the absence of JavaScript.
I use this jQuery/CSS plugin to style select boxes: http://www.adamcoulombe.info/lab/jquery/select-box/
The only way to have a be styled exactly as you want is to not use ...
Google 'custom select box' and you'll find a bunch of alternatives (some of the mentioned by others here)
Like pointed by #Diodeus, it's impossible to change <select> appearance using CSS.
But you always can hope in jQuery. I suggest you to try the selectBox, a jQuery plugin with does auto select replacement. Very easy and very powerfull.