html

How do you XML encode your data?

Nov
30

I was using jqgrid to display some "filtered" data on grid, but some filters won't display any data. My immediate suspect was special characters that may interfere with XML markup.

jqgrid table

CSS Overview

Jan
23

Rational for using CSS

Cascade Style Sheet (CSS) is designed to remove style from the HTML documents, and store them separately for portability and reusability.

A CSS rule contains at least one selector and at least one declaration within a declaration block.

  • Each selector is separated by a comma (,), and a space used to cascade specificity.
  • A declaration is made up by name/value pair, and each declaration is separated by a semicolon (;)
  • A declaration block is defined by curly braces ({}).

There are three types of style sheets.

How do you customize Google Custom Search Engine (CSE)?

Jul
11

Have you tried to customize the Google CSE search box to fit your website theme, and having difficulty implementing it? You're not alone. I've browsed Google CSE documentation for some time, but this information is buried under the hood and took me a while to figure this out. This is a 2-page Search & Results page design. You'll style the form element how ever you wish to design.

Search Box:

CSS Specificity - Which CSS Rule to apply?

May
28

What is Specificity?

Each CSS selector has a specificity value, and more specific selector has the higher precedence it has. If multiple selectors apply to a single element, the highest specificity CSS rule apply to the element. Have you had an experience where you define a CSS rule for an element, and it doesn't work? You probably have a CSS rule that has a higher specificity value which causes your newly created CSS rule to not apply.

Which CSS rule applies to an element?

[SOLVED] Google Chrome not loading external stylesheet.css

Feb
27

We have a webpage with a link to external stylesheet, but the Google Chrome doesn't appear to load the stylesheet while Firefox, Mozilla and IE displays the page correctly. Only some versions of the Chrome is not applying the styles defined in the external .css file.

We've found the cause of the problem to be one of the following two scenarios:

How to scroll to the top after a form submission in iframe?

Feb
27

This is not very likely scenario, but we use an iframe to embed a third-party content containing a multi-page form with a varying length of contents. The submit button on the earlier page is down near the bottom, but the resulting page is short and the content appears on the top. So, when a user submits the form the resulting page is empty as the contents are all the way on the top, and the browser is scrolled down too far. How do you get around this problem?

I did a google search, and found a couple of solutions:

How to vertical-align input box and label text?

Apr
19

Vertically aligning input box and the label that goes with it is quiet challenging especially when you have vertically align them on all browsers such as IE, Firefox, Chrome, Safari and Opera; and on all different versions on all available OSes. I had to work with multiple checkboxes in a single row with label attached to each input checkbox, and when I thought I've got it done; it worked all but on a Chrome running in Mac. This made me rework the whole thing again from scratch using display table CSS property.

HTML5 Overview

Apr
12

HTML 5 is the fifth revision of the Hyper Text Markup Language (HTML) designed to display web pages. HTML 5 is the next generation markup language encompassing HTML 4, XHTML 1, DOM Level 2 and CSS 3. The core aim is to support multimedia and rich graphics content not only on desktop devices, but also mobile and tablet devices. The next wave of software offering is via a web (Software as a Service, SaaS for short), and we need an ability to deliver rich media on the web and HTML5 is being designed to do that.

Missing closing php tag

Feb
17

I have seen many open-source web applications such as Drupal and Wordpress with missing closing php tag (?>) in header and other include files. The application does work flawlessly, and I am curious to know why those closing tags are missing. According to the php.net manual, ...

Copy and Paste Word document to HTML form

Feb
04

Many users without computer knowledge copy contents from a word document, and paste them into a HTML form (<textarea></textarea>) and expect to retain formating as well as special characters such as smart quotes and emdashes. You may opt to translate smart quotes to regular quotes and emdashes to regular dashes with a PHP script. If any user submits a non-ASCII character contents, you'll probably see weird characters in the database and HTML page. Finding and fixing just a few of them (curly quotes and em dashes) isn't going to solve the real problem.

Pages

Subscribe to RSS - html