I want to customize the default look of alert boxes which generally shows in any browser. Is there any way to customize according to my choice?
I found this link.
Actually i want to customize alert boxes so that i can use it using PHONEGAP
No, you can't style alert boxes. If you want to style popups use modal windows.
Related
I'm using the Google SaveToDrive button on my webpage as shown here: https://developers.google.com/drive/savetodrive
However, the g-savetodrive button always shows up in a fixed size that does not match the rest of my UI/layout. Are there any parameters to it that we can change the size of the button?
I tried other possibilities that I saw in +1 and Google SignIn buttons also (like data-size, data-width, data-height), but none of them worked.
The short answer is: not easily.
The google api embeds the icon in an iframe, which means you'd have to do some fiddling with jquery to apply any style rules to the button.
see: How to apply CSS to iframe?
To make matters worse the img source is very small. Stretching it yields a very fuzzy image that I wouldn't recommend. At the very least you'll want to find a large drive image and use that instead.
I think your best bet is creating a custom button that emulates googles class and id tags. Hopefully you can reverse engineer the button click and hook your custom button up to the same functionality.
So I'm trying to use the tab feature of the Bootstrap CSS. I've been following the code here:
http://getbootstrap.com/javascript/#tabs-usage
On the section Methods. However, when I click the tabs that I have, it doesn't appear to switch after changing the text to see whether it switches or not. What script do I use to switch tabs?
you should attach the jQuery and the bootstrap.min.js to your page. Then it will work for sure!!
Good luck!
I am using HTML5 on an iPad application.
Is there anything like an alert box that I can use to show a message? I know HTML5 has a dialog box but if there is an alert box that would be better.
You can use the good old-fashioned JavaScript alerts:
alert("Hey! Pay attention!")
See here: http://www.w3schools.com/jsref/met_win_alert.asp
Could someone please tell me how can I change the default css of a alert/prompt box ?
You can't. They are native to the browser and are not styl-able.
You should turn to javascript alert-like systems. Using jQuery, here are some:
jAlert
jQuery UI dialog (with some tweaking)
This page proposes three alternatives to native alert/confirm/prompt
This answer shows a way to have a confirm-like blocking dialog using jquery ui dialog
The alert box is built into the Browser. You will need to popup your own dialog. The jQueryUI is very good for this.
For an example on this, look on the jQuery UI site.
As noted above you may always use the jQuery Alert box...
But you may also fire a JavaScript/jQuery Function in which displays a DIV (HTML Element), in which you may style completely.
The alert box that is used by javaScript is part of the browser. (other poeple have pointed this out but if you would like to have a good starting point try this.
http://jqueryui.com/demos/dialog/#default
jQuery Ui has some great tools for creating your own alert box and will also having other helpful options.
Just wanted to give some more information.
Is there any way to make the same size of html input button and uploaded file control browse button?
When I make changes in size of html input button, it affects to the horizontal alignment of these buttons?
Thanks
Aung
This relies on the browser and cannot be changed without javascript (re-doing the elements for instance).
you cannot change the look and feel of basic object. To achieve this, you can create custom server side control in which you achieve the desired look by overriding the render.