Parent pages:
  1. Home
  2. Blog

Marat Tanalin on web-development and IT

  • On validation

    From a learning perspective, a validator is like the pedantic teacher who loves their red pen: some of its feedback is quite useful, but the remainder is likely to confuse and intimidate a newcomer.
    Atul Varma (Mozilla)

  • Taming Firefox status bar (+)

    In Firefox 4, statusbar has started to show at the right instead of at the left of browser window if search bar is opened. (Statusbar is used, for example, to display URL address of a currently hovered link.)

    As a result, statusbar is shown now at the left, now at the right, and fundamental usability rule has become violated: specific element of interface should always be placed on one and the same place.

    Those annoyed by this Firefox bug can manually add following CSS rules to chrome/userChrome.css file in Firefox profile directory or with Stylish extension to fix the issue.

  • How to deny loading page into frame of third-party site (+)

    A modern method to deny loading pages of your site into frame (FRAME or IFRAME HTML-element) on another site is using of X-Frame-Options HTTP-server response header.

    The feature is supported by all modern browsers including IE8+.

  • TIME element is removed from HTML5 (+)

    HTML5 spec editor Ian Hickson has removed the TIME element from the HTML5 spec. This element allowed to markup dates (e.g., article publication date) usably and intuitively and was one of a few really semantic new features of HTML5:

    <time pubdate>2009-08-30</time>

    As a “replacement”, he offers new common DATA element intended to markup any abstract data and having much more cluttered syntax based on microformats.

    Next step of Ian will probably be dropping all semantic elements (headers, paragraphs, lists, etc.) and their replacement to the great unified DIV element.

  • Citing online source on republication (+)

    On republication of materials from other sites, it’s a rule to specify clickable link to source.

    Link to home page of source site is generally useless for user and makes sense only from the viewpoint of search engine optimization of source site.

    On the contrary, full direct link to exact page containing source material itself is useful and usable for user.

  • Default function-arguments in dynamic languages (+)

    Dynamic programming languages in general and PHP in particular allow specifying default values for parameters of functions and methods.

    The values can be specified directly in parameter list, but then, to skip a parameter when calling function, programmer is forced to recall what is default value for skipped parameter, or open documentation for the specific function. This is not enough usable in practice, so we can act in a different way.

  • Positioning background with offset from element’s bottom-right corner (+)

    Formerly, to position background with an offset from right or bottom edge of an HTML-element, we has been forced to embed empty space into image itself since CSS had not native support for such feature.

    Situation is changing thanks to CSS3 “Backgrounds and Borders” module providing updated syntax for background-position that allows specify arbitrary offsets from right and/or bottom edges of element.

  • Border-radius generator

    border-radius generator is author’s online tool to automatedly generate CSS-code for rounded corners of HTML-blocks via CSS3-properties of border-radius family.

    Features:

    • generating minimal sufficient CSS-code with identical radiuses taken into account;
    • ability to specify radius for each corner separately from common radius for all corners;
    • choosing exact set of needed vendor prefixes;
    • disableable aligning of properties by colon;
    • built-in workaround for issues related to rendering rounded corners.
  • How to fix border-radius rendering (+)

    In browsers other than Firefox, there are issues related to rendering elements that have border-radius. But there is a workaround applicable in most cases.

  • :first-child pseudoclass and + combinator in IE7 (+)

    Though IE7 formally supports both :first-child CSS-selector and + combinator, there is a limitation: if HTML-code has a comment in place where browser expects to see an element according to CSS selector, IE7 will not apply styles to actual element next to the comment.

    However there is a workaround for the issue: HTML-comments as DOM-nodes can be dynamically removed from DOM tree with JavaScript once HTML-page is loaded.