How to debug the media print view set by @media print {} in CSS of Web pages in Firefox? In firefox, after opening the Web page, First, hit “Shift + F2” to open the “Developer Toolbar” at the bottom. Second, in the “Developer Toobar”, input media emulate print and Firefox will show the print view
Read more
Tag: CSS
How to make AdSense responsive ads show rectangle ads instead of horizontal ones?
Posted onI noticed that many sites with AdSense responsive ads show large rectangle ads (336px x 280px) or large rectangle text ads (full width x 280px). However, in my own website (640px width content area), it shows most of time horizontal ones. How to make AdSense responsive ads show rectangle ads instead of horizontal ones? At
Read more
How to remove AdSense ads for mobile devices while keep them for desktops?
Posted onI want to add adsense ads to be shown to visitors on desktop only. How to remove AdSense ads for mobile devices? You can achieve this through using “Responsive ad unit” of AdSense. The support article Create a responsive ad unit from AdSense discusses this and gives an example. Check the “Hiding an ad unit”
Read more
How to embed mp4 video in HTML pages?
Posted onI have a mp4 video file. How to embed it video in HTML pages? I use this piece of code: In HTML: <video class=”movie” src=”path/to/file.mp4″ controls></video> The CSS for “movie” class: .movie { max-width:1000px; } Here is one example.
fclose Q2A theme
Posted onCan I get the fclose Q2A theme used here? I’d like to share it but I also want to keep my site a little bit unique. What about this: you can get the css and qa-theme.php files, but need to find or design your own icons for the site (I believe some icons from other
Read more
How to fetch a webpage as a mobile browser with curl on Linux?
Posted onOn Linux, how to download a webpage as a mobile browser? You can change the agent of curl to be a mobile browser’s and the remote webserver may be consider the request from a mobile browser: curl -A “Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/28.0.1500.12 Mobile/10B329 Safari/8536.25”
Read more
How to convert a latex document with figures to a HTML file?
Posted onHow to convert a latex document with figures to a HTML file? htlatex (On Fedora, it is in the package texlive-tex4ht) can generate the html from a latex doc better than latex2html. From my experience, it can produce a better html file.
How to @import a css file only for wide screens
Posted onHow to @import a css file, such as for an open fonts hosted by Google, only for wide screens, such as with px of larger than 846? A piece of css that you can use: @import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700,900) (min-width:846px) This import Open Sans fonts for only screens of at least 846 px.
WordPress theme TwentyFourteen interfere with AddThis Welcome Bar
Posted onThe AddThis welcome bar will make a empty gap on top of the WordPress webpage with the TwentyFourteen wordpress theme. Is there a fix for it? You will find AddThis will add this div to the webpage: <div class=”addthis_bar_placeholder” style=”height: 46px;”></div> which cause the problem. A little trick that works is to set that div’s
Read more
How to change the fonts of gnome-shell for gnome3?
Posted onHow to change the fonts of gnome-shell for gnome3? Like the system bar. The fonts of gnome-shell is described in its own theme. For the default gnome-shell, you need to edit the file as root: /usr/share/gnome-shell/theme/gnome-shell.css Right, it is a css file. Find the font-family keyword and change the corresponding fonts. Then you can restart
Read more
Excerpt in homepage, category, tag and author pages for WordPress theme Twenty Thriteen
Posted onExcerpt in homepage, category, tag and author pages for WordPress theme Twenty Thriteen. Also add the “read more” link after the excerpt. The patch: diff –git a/wp-content/themes/twentythirteen/content.php b/wp-content/themes/twentythirteen/content.php index 4f61b22..53b4686 100644 — a/wp-content/themes/twentythirteen/content.php +++ b/wp-content/themes/twentythirteen/content.php @@ -30,7 +30,7 @@ </div><!– .entry-meta –> </header><!– .entry-header –> – <?php if ( is_search() ) : // Only display
Read more
How to force Chrome on iPhone refresh pages and invalidate the caches
Posted onI find Chrome on my iPhone caches pages/css/js files. That makes browsing faster. However, under some situation, I’d like to force it refresh the pages/css/js and give me the latest one. How to force Chrome on iPhone refresh pages and invalidate the caches? The only method as far as I can find is to clear
Read more
WordPress: How to use Markdown for writing posts
Posted onI like the Markdown editor whick is widely used (e.g. This site) and very convenient to use. How to add a Markdown editor for WordPress? I tried some plugins and find they have their strengthens and disadvantages. Here are my requirements: Compatible with my existing posts. They should still display well. I can accept minimum
Read more
Single sign-in for social accounts for question2answer?
Posted onHow to enable single sign-in for social accounts for question2answer? These servers are required: Google, Facebook, Twitter, OpenID. This site moved from Loginza to Question2Answer Open Login which works like a charm. I use the Loginza and it works very well. For Q2A, SLonoed wrote a nice plugin for loginza. How to use it: Download
Read more
Disable WordPress Built-in Canonical URL link tag in HTML head
Posted onThe built-in canonical URL function since WordPress 2.9 is great. But under some situation, it is not needed. For example, all the Mingle Forum threads’ canonical URL is set to the URL of the page that contains the [mingleforum] shortcode, which, of course, is wrong. How to diabled it? We can disabled WordPress’s Built-in Canonical
Read more
Push and Pull data from Restful Service in Asp.net MVC Application using Angular JS
Posted onIn this post, asp.net development India based professionals will explain the best way to manage the Restful service using AngularJS. They are explaining the push and pull functionality available in Rest service in simple steps. Read the article to know more. In this Post I am going explain how we can manage the Restful service
Read more
Fetching RSS Feed and Outputing Feed Items as HTML in PHP
Posted onIt is useful to show the feed items directly on the webpage as HTML content. In this ost, we will show one single PHP function that fetches an RSS feed and outputs the feed items as HTML elements in the web page. One example to fetch an RSS feed and output the itmes as HTML
Read more
Accelerating WordPress with WP Super Cache, Opcache and Autoptimize
Posted onWordPress can be very fast after some effort on performance optimization with the help from its plenty of plugins. Possible ways include using cache to cut down the number of database queries, improves HTML/JavaScript/CSS code, and optimizing PHP’s performance with opcode cache. In this post, we introduce how to speed up WordPress with OPcache, page
Read more
Customizing Fonts in Gnome 3
Posted onGnome 3 is great and I can understand that it emphasizes on simplicity. However, the configuration settings for Gnome 3 does not provide tools for certain functions that I need. One of them is customizing the fonts. This post will summarize the tools/tips that I adopted to customize the fonts in Gnome 3. Usually, the
Read more
RGBlite WordPress Theme
Posted onAbout RGBlite Theme RGBlite Theme is a simple and light-weight theme for WordPress. RGBlite Theme provides a green-red-blue mixed style, bright view and fast rendering experience to the users. RGBlite Theme passes W3C XHTML 1.0 and W3C CSS level 3 validation. This theme works well on WordPress 2.9.x and WordPress 3.0. RGBlite theme is among
Read more