Saturday, 2 April 2016
Cross Browser css issue with Media query
Full code for mozilla, opera, safari and Chrome: APPLY CSS
================================================
@media screen and (max-width: 767px) {
div.take-me-top p {
font-size: 10px !important;
}
/* moz - Firefox */
@-moz-document url-prefix() {
/* firefox-only css goes here */
div.take-me-top p {
font-size: 10px !important;
}
}
/* opera */
x:-o-prefocus,
div.take-me-top p {
font-size: 10px !important;
}
/* safari */
_::-webkit-:not(:root:root),
div.take-me-top p {
font-size: 10px !important;
}
/* IE */
* div.take-me-top p {
font-size: 10px !important;
}
(or)
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* IE10+ CSS styles go here */
.div.take-me-top p{
z-index:1 !important;
}
/* chrome browser only */
@media screen and (-webkit-min-device-pixel-ratio:0) {
div.take-me-top p {
font-size: 10px !important;
}}
@note : div.take-me-top p is class property name
-------------------------------------------------------------------------------------------
mozilla browser + media query css code:
=======================================
@-moz-document url-prefix() {
/* firefox-only css goes here */
@media screen and (max-width: 767px) {
div.take-me-top p {
font-size: 10px !important;
}
}
}
this will work on other browser and media query:
@media screen and (max-width: 767px) {
@-moz-document url-prefix() {
/* firefox-only css goes here */
div.take-me-top p {
font-size: 10px !important;
}
}
}
opera:
======
p {
background: green;
}
x:-o-prefocus, p {
background: red;
}
or
/*opera only hack*/
@media not all and (-webkit-min-device-pixel-ratio:0) {
.styled-select select{
width:100%;
height:24px;
}
}
safari Only:
=============
_::-webkit-:not(:root:root),
div.take-me-top p {
font-size: 10px !important;
}
IE all Version:
================
* div.take-me-top p {
font-size: 10px !important;
}
/* css for ie only */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { }
================================================
@media screen and (max-width: 767px) {
div.take-me-top p {
font-size: 10px !important;
}
/* moz - Firefox */
@-moz-document url-prefix() {
/* firefox-only css goes here */
div.take-me-top p {
font-size: 10px !important;
}
}
/* opera */
x:-o-prefocus,
div.take-me-top p {
font-size: 10px !important;
}
/* safari */
_::-webkit-:not(:root:root),
div.take-me-top p {
font-size: 10px !important;
}
/* IE */
* div.take-me-top p {
font-size: 10px !important;
}
(or)
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* IE10+ CSS styles go here */
.div.take-me-top p{
z-index:1 !important;
}
/* chrome browser only */
@media screen and (-webkit-min-device-pixel-ratio:0) {
div.take-me-top p {
font-size: 10px !important;
}}
@note : div.take-me-top p is class property name
-------------------------------------------------------------------------------------------
mozilla browser + media query css code:
=======================================
@-moz-document url-prefix() {
/* firefox-only css goes here */
@media screen and (max-width: 767px) {
div.take-me-top p {
font-size: 10px !important;
}
}
}
this will work on other browser and media query:
@media screen and (max-width: 767px) {
@-moz-document url-prefix() {
/* firefox-only css goes here */
div.take-me-top p {
font-size: 10px !important;
}
}
}
opera:
======
p {
background: green;
}
x:-o-prefocus, p {
background: red;
}
or
/*opera only hack*/
@media not all and (-webkit-min-device-pixel-ratio:0) {
.styled-select select{
width:100%;
height:24px;
}
}
safari Only:
=============
_::-webkit-:not(:root:root),
div.take-me-top p {
font-size: 10px !important;
}
IE all Version:
================
* div.take-me-top p {
font-size: 10px !important;
}
/* css for ie only */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { }
Sunday, 24 January 2016
Facebook - share Dialog - FB.Ui
Facebook Share Dialog: JavaScript and Angular JS
================================================
Register with Developer.facebook.com as developer in public profile (FB Id/user account Required)
Step:1
=======
list required are:
Domain Name, App Name(APPID), URL, OAuthRedirect Url, Review and status as public, Select platform as Website/Android/iOS...
Step:2
======
Include FB_SDK in index.html:
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.5&appId=654932564610265";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
step:3
======
Add the facebook connect page - onclick open popup dialog - Required page and section
<li>
<a target="_blank" ng-click="FBConnect()">
<img class="fa fa-facebook" src="../../fb.png" /></a>
</li>
step:4
=======
Call or Define Controller method for FB- within controller
$scope.FBConnect = function() {
FB.ui({
method: 'share',
href: 'http://trinet.bornbaby.com/',
title: 'Bahubali',
picture: 'http://trinet.bornbaby.com/blog/blog-ps-1.jpg/blog-ps-1.jpg',
caption: 'Domain Internet',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
}, function(response) {});
}
================================================
Register with Developer.facebook.com as developer in public profile (FB Id/user account Required)
Step:1
=======
list required are:
Domain Name, App Name(APPID), URL, OAuthRedirect Url, Review and status as public, Select platform as Website/Android/iOS...
Step:2
======
Include FB_SDK in index.html:
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.5&appId=654932564610265";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
step:3
======
Add the facebook connect page - onclick open popup dialog - Required page and section
<li>
<a target="_blank" ng-click="FBConnect()">
<img class="fa fa-facebook" src="../../fb.png" /></a>
</li>
step:4
=======
Call or Define Controller method for FB- within controller
$scope.FBConnect = function() {
FB.ui({
method: 'share',
href: 'http://trinet.bornbaby.com/',
title: 'Bahubali',
picture: 'http://trinet.bornbaby.com/blog/blog-ps-1.jpg/blog-ps-1.jpg',
caption: 'Domain Internet',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
}, function(response) {});
}
Auto start XAMPP when linux OS start / login
XAMPP:
=====
Automatically start it on login.
step:1
Open terminal and run following command.
$sudo gedit /etc/init.d/lampp
step:2
paste following code in opened file
#!/bin/bash
/opt/lampp/lampp start
save & close
step:3
run following command to make this script executable
$sudo chmod +x /etc/init.d/lampp
step:4
run following command to install init scripts to all runlevel
$sudo update-rc.d lampp defaults
step:5
restart the system
&
xampp would be start automatically. You can check it by opening
http://localhost in browser
=====
Automatically start it on login.
step:1
Open terminal and run following command.
$sudo gedit /etc/init.d/lampp
step:2
paste following code in opened file
#!/bin/bash
/opt/lampp/lampp start
save & close
step:3
run following command to make this script executable
$sudo chmod +x /etc/init.d/lampp
step:4
run following command to install init scripts to all runlevel
$sudo update-rc.d lampp defaults
step:5
restart the system
&
xampp would be start automatically. You can check it by opening
http://localhost in browser
Run Php - xampp in linux
How to run xampp php code in ubuntu:
------------------------------------
In this case you need to be root to start/stop LAMPP and to execute PHP code in it.
step:1
To become root just open the terminal and type the following command
(To avoid conflict stop lampp using this cmd $ /opt/lampp/lampp stop)
$sudo -i (Ntow the system by default as root. In older version ask password)
step:2
$cd /
step:3
ls
step:4
start lampp
$ /opt/lampp/lampp start
step:5
Write code - Terminal cmd
$gedit /opt/lampp/htdocs/FileName.php
New php editor open- Do your code here save and close
step:6
go browser ype:
http://localhost/FileName.php
Step:7
Rewrite the file
open file in terminal using
$ gedit /opt/lamp/htdocs/FileName.php
Note: My php root - www folder is located at computer->opt->lampp->htdocs
------------------------------------
In this case you need to be root to start/stop LAMPP and to execute PHP code in it.
step:1
To become root just open the terminal and type the following command
(To avoid conflict stop lampp using this cmd $ /opt/lampp/lampp stop)
$sudo -i (Ntow the system by default as root. In older version ask password)
step:2
$cd /
step:3
ls
step:4
start lampp
$ /opt/lampp/lampp start
step:5
Write code - Terminal cmd
$gedit /opt/lampp/htdocs/FileName.php
New php editor open- Do your code here save and close
step:6
go browser ype:
http://localhost/FileName.php
Step:7
Rewrite the file
open file in terminal using
$ gedit /opt/lamp/htdocs/FileName.php
Note: My php root - www folder is located at computer->opt->lampp->htdocs
Linux - XAMPP
To start xampp in linux ubuntu:
-------------------------------
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo /opt/lampp/lampp restart
step:1
======
Go on XAMPP site and download XAMPP. URL to download XAMPP is
http://www.apachefriends.org/en/xampp-linux.html
step:2
Let the download complete. Confirm download by opening download folder.
step:3
Open terminal and move to download location. Verify that downloaded Xampp installer file exist there. If you have moved Xampp file in other folder than move that folder which contain Xampp file.
TERMINAL:$cd /home/[Username]/Downloads
TERMINAL:$ls
step:4
Make installer file to executable. Run following command
TERMINAL:$chmod +x xampp-linux-1.8.2-0-installer.run
Installation requires root privilege. Switch to root user. You need to suppply super user password to become root user. Super user is the user account which is created during the installation.
step:5
TERMINAL:$sudo -s -H
step:6
Run installer file
TERMINAL:$./xampp-linux-1.8.2-0-installer.run
step:7
Keep default selected component and click on next
Next->next->next->
step:8
XAMPP is successfully installed. But mysql server would not start automatically. You would get following error while accessing phpmyadmin
TERMINAL:$sudo /opt/lampp/lampp restart
STEP:9
Now access again phpmyadmin
http://localhost/phpmyadmin/
-------------------------------
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo /opt/lampp/lampp restart
step:1
======
Go on XAMPP site and download XAMPP. URL to download XAMPP is
http://www.apachefriends.org/en/xampp-linux.html
step:2
Let the download complete. Confirm download by opening download folder.
step:3
Open terminal and move to download location. Verify that downloaded Xampp installer file exist there. If you have moved Xampp file in other folder than move that folder which contain Xampp file.
TERMINAL:$cd /home/[Username]/Downloads
TERMINAL:$ls
step:4
Make installer file to executable. Run following command
TERMINAL:$chmod +x xampp-linux-1.8.2-0-installer.run
Installation requires root privilege. Switch to root user. You need to suppply super user password to become root user. Super user is the user account which is created during the installation.
step:5
TERMINAL:$sudo -s -H
step:6
Run installer file
TERMINAL:$./xampp-linux-1.8.2-0-installer.run
step:7
Keep default selected component and click on next
Next->next->next->
step:8
XAMPP is successfully installed. But mysql server would not start automatically. You would get following error while accessing phpmyadmin
TERMINAL:$sudo /opt/lampp/lampp restart
STEP:9
Now access again phpmyadmin
http://localhost/phpmyadmin/
Sunday, 20 September 2015
USB_debuggin_enable
USB dubugging enable for new android mobile - Asus zenfone
http://firstandgeek.com/developer-option-usb-debugging-asus-zenfone-5/
Go to Settings
Click on About
Then Choose Software Information
Tap the Build Number for nearly 10 times, so that for each press, it shows you are near to the developer option. Continue until it unlocks the developer option for you.
After that go to the Settings page again. At the bottom, You could see the developer option as following.
Inside the developer option, there is USB debugging option.
Not only the USB debugging feature, but also Stake Away, Mock Location Allowing, Force RTL layout direction, animation scale, GPU rendering, Strict mode etc can be accessed by simply enabling this Developer option. As I owned Zenfone now, more Zenfone tips and tricks will be updated soon. if you have any problems regarding your Zenfone, kindly mail me and I will give you the answer.
http://firstandgeek.com/developer-option-usb-debugging-asus-zenfone-5/
Go to Settings
Click on About
Then Choose Software Information
Tap the Build Number for nearly 10 times, so that for each press, it shows you are near to the developer option. Continue until it unlocks the developer option for you.
After that go to the Settings page again. At the bottom, You could see the developer option as following.
Inside the developer option, there is USB debugging option.
Not only the USB debugging feature, but also Stake Away, Mock Location Allowing, Force RTL layout direction, animation scale, GPU rendering, Strict mode etc can be accessed by simply enabling this Developer option. As I owned Zenfone now, more Zenfone tips and tricks will be updated soon. if you have any problems regarding your Zenfone, kindly mail me and I will give you the answer.
sleep_android_activity
Thread closeActivity = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(3000);
// Do some stuff
} catch (Exception e) {
e.getLocalizedMessage();
}
}
});
@Override
public void run() {
try {
Thread.sleep(3000);
// Do some stuff
} catch (Exception e) {
e.getLocalizedMessage();
}
}
});
Showing hint of page on Nav Bar TAB
Nav bar - mouse over- show name of current tab/page show
<a href="index.html" title="Home" ></a>
<ul class="nav">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="advisoryboard.html">Advisory Board</a></li>
<li><a href="editorialboard.html">Editorial Board</a></li>
<li><a href="instructionstoauthor.html">Instructions to Author</a></li>
<li class="active"><a href="indexing_listing.html">Indexing And Listing</a></li>
<li><a href="current_issues.html">Current Issue</a></li>
<li><a href="archives.html">Archives</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
<a href="index.html" title="Home" ></a>
<ul class="nav">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="advisoryboard.html">Advisory Board</a></li>
<li><a href="editorialboard.html">Editorial Board</a></li>
<li><a href="instructionstoauthor.html">Instructions to Author</a></li>
<li class="active"><a href="indexing_listing.html">Indexing And Listing</a></li>
<li><a href="current_issues.html">Current Issue</a></li>
<li><a href="archives.html">Archives</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
jQuery Mobile: Stick footer to bottom of page:
jQuery Mobile: Stick footer to bottom of page:
=================================
add css:
----------
[data-role=page]{height: 100% !important; position:relative !important;}
[data-role=footer]{bottom:0; position:absolute !important; top: auto !important; width:100%;}
Disable Div.jqm-content :
css :
div.jqm-contne{ display:none; }
=================================
add css:
----------
[data-role=page]{height: 100% !important; position:relative !important;}
[data-role=footer]{bottom:0; position:absolute !important; top: auto !important; width:100%;}
Disable Div.jqm-content :
css :
div.jqm-contne{ display:none; }
Fav_Icon_for web site
Convert your image to the ICO format :
http://image.online-convert.com/convert-to-ico
Upload image and set pixel 16x16
convert and download image as ico format..
Add this line in html page after meta Tag and before Css inclusion.
<link rel="icon" type="image/jpg" href="images/fav.ico">
http://image.online-convert.com/convert-to-ico
Upload image and set pixel 16x16
convert and download image as ico format..
Add this line in html page after meta Tag and before Css inclusion.
<link rel="icon" type="image/jpg" href="images/fav.ico">
Subscribe to:
Posts (Atom)
Redux vs Redux Toolkit vs React Context
These are often confused. Feature Redux Redux Toolkit Context API Purpose State management Simplifies Redux Shares values in Rea...
-
How to iterate through multiple rows in jquery using ajax, json, and php ================================================= REF LINK : h...