Outstando

Awesome HTML, CSS, jQuery & WordPress theme Tips & Services

  • Home
  • Categories
    • Artikel
    • Tautan
    • Tutorial
    • Uncategorized
  • Freebies
  • Topics

    .jpg @font-face add_action() Background Basic Button Child Theme CSS CSS3 Dashboard Datepicker Download Efisiensi Facebook Connect Facebook OpenGraph Plugin Font functions.php Genesis hover HTML image Image Replacement jQuery jQuery Plugin Konsep PHP post type pseudo class Random Background Release slideToggle() Text Replacement Theme Framework Theming Thoughtplifier Timepicker Tips Troubleshooting Typography WordPress WordPress hack WordPress Plugin Wordpress Theme wp_head xHTML
  • Recent Posts

    • Limited Fixed Area Using jQuery
    • Understanding jQuery’s .animate() API
    • Tables Involved in WordPress Menu Feature
    • Simple Do-It-Yourself Modal Box
    • Dead Simple Do-It-Yourself Tabbed Area Using jQuery
  • Recent Comments

    • Jajang on Tables Involved in WordPress Menu Feature
    • Taufik on Working With CSS3′s @font-face
    • Jonas on Simple Do-It-Yourself Modal Box
    • mial on WordPress Simple Random Background Using Matt Mullenweg’s randomimage script
    • keren on Sliding Dropdown Menu Menggunakan jQuery
less more

Image Replacement Untuk Logo Situs

Written by Fikri Rasyid

Keterbatasan font yang terinstall di desktop client dan kebutuhan untuk menampilkan font yang sama persis dengan tampilan desain melahirkan metode-metode seperti text-replacement dan image-replacement. Text replacement adalah metode me-replace teks dengan font custom yang diinginkan menggunakan flash, image atau javascript sedangkan image replacement adalah metoda text replacement yang fokus menggunakan image.

Image replacement umumnya dilakukan untuk bagian-bagian yang relatif tidak banyak berubah seperti logotype untuk logo situs / blog, sementara text replacement lebih lazim digunakan untuk bagian – bagian yang dinamis seperti heading / subheading menggunakan SiFR, Cufon atau @font-face.

Image replacement untuk logotype logo situs

Chris Coyier dari CSS-Tricks telah menulis 9 metoda image replacement lengkap dengan komparasi, kelebihan dan kekurangannya (penjelasan lebih detail dapat dibaca disana). Metode image replacement yang saya rasa paling baik adalah the NEW way of Image Replacement yang Chris telah bahas di Rethinking CSS Image Replacement.  Saya telaah, Nick La dari N Design Studio pun ternyata menggunakan metode ini pada Web Designer Wall. Metode ini keren karena bekerja baik karena tetap memiliki tampilan yang “readable” jika browser men-disable image (saya tidak mengasumsikan CSS off karena pengguna mana sih yang mendisable CSS browser-nya? – Berbeda dengan disable image).

Markup HTML

Ini markup html yang diperlukan untuk image replacement logotype. Image berformat .gif dengan support terhadap transparansi.

<h1 id="logo-site">
<a href="#">
<img src="bloggingly-logo.gif" alt="Bloggingly - Ulasan Seru Seputar Blogging" />
</a>
</h1>

CSS

Ini kode CSSnya. Perhatikan comment yang saya sertakan.

#demo-wrapper:after {
content: ".";
visibility: hidden;
display: block;
height: 0;
clear: both;
}
/* pseudo-class :after dilakukan untuk menghindari collapsing yang disebabkan oleh floating child element*/

h1#logo-site {
width:223px; height:69px; float:left;
/* tanpa pendeklarasian width height dan float ini tampilan sudah bekerja dengan baik.
Namun jika anda ingin menempatkan elemen lain disisi icon, 'pemadatan' menggunakan float jadi wajib dilakukan */
margin:10px;
}

h1#logo-site a img {
width:223px; height:69px; float:left; overflow:hidden;
/* membuat ALT text 'tetap berada dilokasinya' ketika images: off */
border:none;
}

Demo

Berikut ini demo dari markup diatas.  Markup html dan CSS ini dioptimasi untuk dapat menghasilkan tampilan yang relatif stabil dan readable jika image tidak ditampilkan oleh browser (umumnya pada kasus pengguna dengan koneksi internet lambat atau mobile browser pengguna opera yang imagenya di disable).

Lihat demo image replacement untuk logo situs.

About The Author

Fikri Rasyid - I speak HTML + CSS + jQuery, breath in world wide WordPress-land, co-founded WPNest and currently pursuing my bachelor degree majoring English Education at Indonesia University of Education. Google my name for more information about me.

Connect & Subscribe

Keep in touch and get my latest content trough:

  • Twitter
  • Facebook
  • RSS Feed
  • Email
    Get latest post on your inbox.

Tags

  • Header
  • Image Replacement
  • Logo
  • Text Replacement

Categories

  • Uncategorized

Post Info

March 17th, 2010

Related Posts

  1. Setup Local Server di Ubuntu
  2. Tentang Custom Post-Type pada WordPress 3.0
  3. Simple jQuery Date/Timepicker
  4. Inilah yang membuat saya mencoba menggun…
  5. http://trentrichardson.com/examples/time…

No Response Yet

  1. Toekangweb » 50 Tutorial CSS/XHTML dalam Bahasa Indonesia

    13 May 2010

    [...] Image Replacement Untuk Logo Situs [...]

    Reply
  2. CSS display:inline-block

    20 February 2011

    [...] value negative text-indent sehingga elemen yang diset dengan value block dapat digunakan untuk teknik image replacement. Satu hal lagi: elemen yang diset block bisa diset fixed [...]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recommended

Thoughtplifier: a single-column WordPress Themes by Outstando

Thoughtplifier: a single-column WordPress Themes by Outstando

Thoughtplifier Theme
Designed & developed by
Fikri Rasyid

  • Categories

    • Artikel
    • Basic Concept
    • Freebies
    • Snippet
    • Tautan
    • Themes
    • Tools
    • Tutorial
    • Uncategorized
  • Archives

    • October 2011
    • September 2011
    • August 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • March 2010