7 Splendid Techniques to Encourage Comments on Your Blog

One of the best ways to gauge the health of your blog readership is to check out how many comments you have for your posts. More comments mean that your readers are actively engaged in what you have to say. Such positive engagement between the readers and yourself creates a lively community that sustains readership and attracts more visitors to your blog.

comments on blogs 7 Splendid Techniques to Encourage Comments on Your Blog

Not getting the amount of comments that you would like to have? Don’t worry; it may not have anything to do with the content you’re providing. You may be providing quality content and information to readers, but not sufficiently stimulating them to provide inputs to your posts.

Here are a few ways to get your readers more involved before you scrutinize your content for any potential flaws. Full list after jump.

Related posts:

1. End with a Question

Sometimes readers don’t know what to comment about. Posting a question about your post will give them an anchor point to what they can talk about. Intuitively speaking, we should place that question right at the end of the post. If your reader has read from the beginning to the end and got to that point, chances are that he or she is interested in what you’ve written. The reader will be pretty motivated to answer your question.

One thing to note is that your question should be as general as possible, unless you want to direct the discussion to a specific point. A general question allows for more freedom in their comments, so that your readers don’t feel constrained and choose not to comment in the end.

2. Ask for Contributions

Another way you can ask for more comments is to get them to contribute to your seemingly incomplete post. This is especially applicable to posts where you organized your content in the form of a numbered list (just like this one). Now, the trick here is to ask your readers to add on to the list. Make them feel that they are contributing to the article by merely commenting their opinion.

A better way will be to end your numbered list abruptly so that it appears to the readers that you need their help to complete the post. Say, for example, you end the list at #9. It seems a little odd (no pun intended) to stop there right? So, you appeal to your readers to help you think of that #10 tip and post it in the comment box.

3. Reply to Comments Promptly

Basic courtesy dictates that when someone gives a certain feedback about one’s work, one should, at the very least, thank him or her. If your reader has a question posed to you, all the more you should answer promptly. This will let your reader feel that his or her comments matter, and that he or she isn’t talking to him or herself.

If you take too long to respond, the reader might have already forgotten about it and take it that there’s no point commenting on your blog posts. The issue here is that these comments are addressed to you, so no one else but you yourself has to reply to it before the reader feels ignored.

4. Reward Insightful Comments

Simply replying when being commented on isn’t enough; sometimes you need a carrot to motivate them to type out what they think. It can be any forms of reward: a contest for the best comment posted, prizes for answering correctly a question posed, or perhaps the promise of writing the next post based on the most interesting comment.

But these are pretty straightforward and overt ways of rewarding commenters, which may come across to some readers as ‘trying too hard’ and put them off.

Well, another perhaps even more effective way is to capitalize on our need for social approval. Making your commenters feel special for posting an insightful comment is a great incentive. They get rewarded with recognition and attention. A perfect example will be that of Facebook’s trademark ‘Like’ button. One reason why we post all those funny and intriguing statuses is probably because we secretly love our friends liking them. Go search around for some plugins that function the same way as the ‘Like’ button for your blog comments.

5. Reduce Barriers to Commenting

Is there anything that might be hindering your readers from posting comments? Do a check yourself and try to post something yourself. Does it go through smoothly? Also, is the comment box easily noticed once you enter the blog as a visitor?

The other thing to look out for is whether visitors to your blog need to register or log in before they can comment on your posts. If this is so, this might be the reason why you’re getting so few comments. Taking that extra step to register in order to comment can be a big turn-off for some readers, so they would rather hold their peace forever.

Make sure to put yourself in the shoe of the visitor or reader in order to know how easy or hard it is to comment.

6. Commenting on Posts in the Blog Community

If you want people to comment, then set a good example yourself! Comment in your own blog and other similar topic blogs in the community. Ensure that you give well thought out comments that relate to the topic in question instead of one-liner generic answers (e.g. “Great Post!”). This is especially so when you comment on other blogs and leave a link to your site. You want to attract readers and the bloggers to your blog and not let them mistaken your comment as a spam.

Providing valuable feedback to a blog entry is pretty much like doing an advertisement for your blog. If you want to garner more comments, one of the most straightforward ways is to improve traffic to your blog. Readers who stumble across those blogs can see what you’ve commented and click on your link to check out yours.

Also, implicitly speaking, the author of the blog whom you posted a comment may feel obliged to return the favor by commenting on your posts. This is particularly so when your comment really strikes a chord with him or her.

7. Shake Things Up a Little

The last point here has something to do with your content. A discussion arises when there is a common goal to work to (e.g. providing suggestion for that last tip in your numbered list) or when there are conflicting opinions. I’ve pretty much discussed the former in my #2 tip on asking readers for contribution. As for the latter, all you need to do is to make your content a little controversial or take sides with a particular opinion of yours.

A blog is more than a news site where you simply present the facts and leave the readers to their own judgments and thoughts. A blog consists of your opinions as well; otherwise there’s little the readers can comment about. These opinions and arguments which you present on your blog should be thought-provoking enough to let your reader react and respond to it, as if to defend their own opinions or even beliefs.

You may feel comfortable sitting on the fence with most of your entries because you don’t want a situation where you offend your readers. Sooner or later though, they may get bored with your lack of opinions. I guess the best way is to feel your way around what your target audience is like, and then adjust your content to the level acceptable to most of them.

[Freebie] St Valentines Icon Set

This year, to celebrate the St Valentines Day, Hongkiat and Grafpedia are really proud to provide you this beautiful and lovely icons set. Roses, Love messages, hearts, chocolates, rings, gifts, candles everything to switch your website and commercial tools in the power of love.

 [Freebie] St Valentines Icon Set

Each icon is available in various sizes: 48×48, 72×72, 128×128, 256×256 and 512×512. You can use them for personal and commercial use. Redistribution without permission is prohibited.

Here’s a quick preview of what’s in the pack:

st valentines icons preview [Freebie] St Valentines Icon Set

Download

5 Amazing Things Internet May Have Ruined

Many of us are unable to survive without the internet because our modern society has grown to become so reliant on it. We go online everyday and has grown so accustomed to the net that we don’t actually realize the impact that the internet has on our lives. Needless to say, the internet has serves us well by allowing us to connect with the rest of the world ever-so-easily.

the internet 5 Amazing Things Internet May Have Ruined
(Image source: Shutterstock)

Yet, this convenience comes with a price tag. We should take a moment and ask ourselves what are some of the things we may have sacrificed along the way. That way, we can gain a proper perspective and approach internet with some caution to ensure that we don’t lose more than what we gain.

1. Privacy

This is something all of us internet users are probably aware of, especially if we’re on some social networking site like Facebook. It used to be the case when stalkers have to resort to physical means to stalk their victims. Not anymore now, with our greater reliance on the internet to provide us with entertainment, goods, information, etc. Such dependence usually means we have to reveal bits and pieces about ourselves (i.e. contact details, credit card numbers, our preferences, etc) in order to transact with the net. Privacy gets compromised as a result, and stalkers use that to their advantage.

Even if you resolve not to engage in any social networking sites by not signing up for one, photos of you or any other information about yourself may still end up in Facebook. How? Well, so long as you have friends who are using Facebook or any of such sites, they can always post things about you that are open to the rest of the world. Got drunk at the party last night? Your friend (or enemy) snaps away with his or her mobile device and post it up on Facebook for the pleasure of the entire network.

Besides, you must’ve probably provided your particulars to some internet company as you register for their newsletters, purchase their products online, etc. Who’s to say that the information you’ve given to them are kept confidential? Don’t you ever wonder how you receive random email spams? Cookies are also embedded within sites to track your mouse movements so that they can be analyzed for marketing purposes, or even for the government to track you.

Are we not all under tight surveillance here in cyberspace?

2. Reliability of Information

With millions of blogs and websites out there on the net, one question we often ask is how much is the information they provide accurate and reliable. Given the convenience and low cost of publishing a blog or a website, there seem to be a lack of accountability for what are being published. The ease of modifying your online publication (as compared to offline publications like books and newsletters) makes putting out incorrect information less of an issue to the owner of the site. He or she can always amend the mistakes at no cost.

media and information 5 Amazing Things Internet May Have Ruined
(Image source: Shutterstock)

Specialized journalists who adhere to the accuracy of the stories they produced are now replaced by bloggers who may not have such practices. The result is that you get a massive number of different versions of the same story because there’s no way to verify it without a trustworthy source (e.g. from a news site). At the worst, opinions can be misinterpreted as facts by readers online who may then go on to spread them as the gospel truth in social networking sites.

As we internet users become aware of the existence of rumors masquerading as truths, we start to become skeptical in whatever we see or hear about be it in Facebook or blogs. This, in effect, creates a generation of cynics among us, who regards internet information as unreliable and shaky at best.

3. Copyrights

While some bloggers write their entries and pay little attention to the correctness of their information, others simply lift them off from other sources and claim it as their own. Plagiarism, as they call it, is rampant in cyberspace. You would’ve probably seen the same content appearing in different websites with no references to the original source. The reason why many seems to be doing it is perhaps because the free concept of the internet has led us to believe information is meant to be spread.

Such ingrained mindset has a similar impact on our perspectives of paying for entertainment. Since the coming of Napster, purchasing for music has become unnecessary for some of us. We could just download the latest albums of our favorite artistes off the net. Then along came the popularity of movies, e-books, applications and games, all of which could be downloaded illegally through file-sharing and bit-torrent applications.

Whether or not you support the free distribution of information and digital commodities like music, copyrights have never ever been so drastically infringed before the internet was available.

4. Genuine Communication

On one hand, internet facilitates communication like no other technology has done so: Emails and chat messengers allow us to be in contact with anyone in the world so long as you’re online. In that sense, internet users like you and I are empowered with an enriched network of unprecedented accessibility. Communication, however, is more than accessibility or contactability. For the sake of connectivity, internet has sacrificed quality and perhaps, genuine communication.

Messages in the form of text can be hard to interpret. Most of us have experienced misunderstandings that arise from the ambiguity of emails or online chats. To make up for the lack of facial expressions and body languages present in real life, emoticons naturally arise to minimize the confusion. Nevertheless, it is still quite hard for one to feel as heard online as when one connects with another in real life. Yet, such quality communications are more and more being replaced by online communication. Again, it has to do with our dependence over the internet.

Shy individuals may hail such superficial online communication as their savior to a better social life. To that, I would say internet provides a good initiation stage for them to know people. For the friendship to progress further, it would still require a physical meet-up in order to truly connect, What happen is that these individuals end up relying on online communication that they become too comfortable with it to advance to offline conversations.

A virtual social life online is still a pseudo one.

5. Work/Life Balance

As accessibility, connectivity and contactability improves with the internet, work expectation increases. Customers expect companies to be available 24-hours a day online, which means that a fully functional website is a must. The implication of such universal expectation is that employees have to access their work emails during the wee hours after office hours. The line between working time and your time becomes blurred.

work life balance 5 Amazing Things Internet May Have Ruined
(Image source: Shutterstock)

Even without the rising expectation of the society at large, the mere fact that internet is accessible 24/7 only means that you can check your emails any time outside work. Your bosses know that for a fact and would use that to their advantage, by sending you work during weekends. Their reason? Everybody’s doing it, so it’s expected of you to follow with the rest of the world.

But of course, it may not happen that way because it depends on the company culture and policy on taking work home. What I’m saying is that the temptation is there in most workplaces to utilize the awesome accessibility of the internet to push work into our personal space. Sometimes even employees themselves want to take work back home knowing that they can do it over the weekend.

If you want to maintain work/life balance, sometimes it’s necessary to draw that line and segregate work time from your time.

One Thing the Internet Will Never Ruin – Creativity

One thing, however, remains un-ruined by the internet and probably will never be: Creativity.

It seems that there’s no end to human creativity. This is especially so when user-generated content is a primary characteristic of the internet. Looking at all the video mashups in Youtube, satirical blogs, podcasts, etc, it’s clear that the internet will evolve along with human’s unlimited creativity. The beautiful thing about the internet is its ability to connect with the world, with everybody inspiring and sharing information with everyone else. Rather than undermining creativity, the internet cultivates and unites the world with it.

100 Imaginative “Cities of the Future” Artworks

What the future might hold has long been a topic of speculation for artists and creative types. Trying to imagine what the world around us might look like in twenty, fifty, hundred years, or even end of the world can provide hours of entertainment. And it’s obvious that those artists and designers who take the time to create concepts of what they think the future might hold for us put a lot of time and consideration into their pieces.

cities of the future 100 Imaginative Cities of the Future Artworks

Below are 100 fantastic artworks depicting what the future of the city might be. There’s a lot of diversity in the images, with everything from dark, almost apocalyptic, scenes to bright eco-utopias.

More:

Utopia City (Image credit: JamesHillGallery)

UtopiaCityJamesHillGallery 100 Imaginative Cities of the Future Artworks

City Of The Future (Image credit: Killerethyl)

cityofthefuturekillerethyl 100 Imaginative Cities of the Future Artworks

City of the Spheres (Image credit: Voyager212)

CityoftheSpheresVoyager212 100 Imaginative Cities of the Future Artworks

Future City 1 (Image credit: PeteAmachree)

futurecity1peteamachree 100 Imaginative Cities of the Future Artworks

City of the Future (Image credit: Jacob07777)

CityoftheFuturebyjacob07777 100 Imaginative Cities of the Future Artworks

Future World 2 (Image credit: RudolfHerczog)

FutureWorld2RudolfHerczog 100 Imaginative Cities of the Future Artworks

Future Road (Image credit: DaniNaimare)

futureroaddaninaimare 100 Imaginative Cities of the Future Artworks

Future Cityscape Concept WIP 5 (Image credit: Toiletbear)

futurecityscapeconcepttoiletbear 100 Imaginative Cities of the Future Artworks

3D Future City (Image credit: Forcg)

3DFutureCityforcg 100 Imaginative Cities of the Future Artworks

City (Image credit: Yty2000)

Cityyty2000 100 Imaginative Cities of the Future Artworks

Future City Concept (Image credit: Cok3ster)

FutureCityConceptCok3ster 100 Imaginative Cities of the Future Artworks

Capital 30 (Image credit: Revolved)

Capital30revolved 100 Imaginative Cities of the Future Artworks

Cross Fate City Concept (Image credit: Adimono)

crossfatecityconceptadimono 100 Imaginative Cities of the Future Artworks

Smog (Image credit: Alexiuss)

Smogalexiuss 100 Imaginative Cities of the Future Artworks

Future City (Image credit: Pevel)

FuturecityPevel 100 Imaginative Cities of the Future Artworks

Speedpaint – Future City (Image credit: Antifan-Real)

SpeedpaintFutureCityANTIFANREAL 100 Imaginative Cities of the Future Artworks

Dark City (Image credit: Vaghauk)

DarkCityVaghauk 100 Imaginative Cities of the Future Artworks

Egypt – 2070 (Image credit: Merl1ncz)

Prague2075merl1ncz 100 Imaginative Cities of the Future Artworks

City Of The Future 2 (Image credit: Xizeon)

CityOfTheFuture2Xizeon 100 Imaginative Cities of the Future Artworks

SFM X-mas – Sci-fi City (Image credit: Enterprise-E)

SFMXmasEnterpriseE 100 Imaginative Cities of the Future Artworks

Future City Too (Image credit: RobertDBrown)

futurecitytoorobertdbrown 100 Imaginative Cities of the Future Artworks

Future Cityscape 1 (Image credit: Jarling-art)

FutureCityscape1jarlingart 100 Imaginative Cities of the Future Artworks

Inner City (Image credit: Aksu)

Innercityaksu 100 Imaginative Cities of the Future Artworks

Future City (Image credit: Xboxpsycho)

FutureCityXboxpsycho 100 Imaginative Cities of the Future Artworks

City of the Future (Image credit: Blackangel559)

cityofthefutureblackangel559 100 Imaginative Cities of the Future Artworks

Epic (Image credit: Christian Stoll)

epicchristianstoll 100 Imaginative Cities of the Future Artworks

Microcity (Image credit: David Fuhrer)

microcitydavidfuhrer 100 Imaginative Cities of the Future Artworks

Paradigm Shift – Zone Zero (Image credit: Aiven – Yvan Feusi and Gaetan Weltzer)

paradigmshift 100 Imaginative Cities of the Future Artworks

Fantasy on City Image in the Future (Image credit: Yaroslav Shkriblyak)

YaroslavShkriblyak 100 Imaginative Cities of the Future Artworks

Dark Tales of the Future (Image credit: Rasmus Poulsen)

rasmuspoulsen 100 Imaginative Cities of the Future Artworks

Advent of Yellowstone (Image credit: Theswordsman77)

adventofyellowstonetheswordsman77 100 Imaginative Cities of the Future Artworks

Organic City (Image credit: Spivak000)

organiccityspivak000 100 Imaginative Cities of the Future Artworks

Gravity City (Image credit: Yonaz)

GravityCity 100 Imaginative Cities of the Future Artworks

Concept: Futuristic City (Image credit: I-NetGraFX)

ConceptFuturisticCityINetGraFX 100 Imaginative Cities of the Future Artworks

Bold Visions – City Docks (Image credit: Antifan-Real)

BoldVisionsCityDocks 100 Imaginative Cities of the Future Artworks

Underwater City (Image credit: Nkabuto)

underwatercitynkabuto 100 Imaginative Cities of the Future Artworks

Meduzarts: Subaru Ep3, Concept (Image credit: I-NetGraFX)

MeduzartsSubaruEp3INetGraFX 100 Imaginative Cities of the Future Artworks

Different World – Different Time (Image credit: Caucasian-eagle)

Differentworlddifferenttime 100 Imaginative Cities of the Future Artworks

Megastructure (Image credit: Hideyoshi)

MegastructureHideyoshi 100 Imaginative Cities of the Future Artworks

Epocholis (Image credit: Jenovah-Art)

epocholisjenovahart 100 Imaginative Cities of the Future Artworks

Mirai Millennium SF BG (Image credit: Pinakes)

miraimillenniumsfbgpinakes 100 Imaginative Cities of the Future Artworks

Cityscape (Image credit: Erenarik)

Cityscapeerenarik 100 Imaginative Cities of the Future Artworks

Ultracity (Image credit: Guitfiddle)

Ultracityguitfiddle 100 Imaginative Cities of the Future Artworks

Metropolis (Image credit: Hideyoshi)

metropolishideyoshi 100 Imaginative Cities of the Future Artworks

City Concept 3 (Image credit: Voyager212)

Cityconcept3Voyager212 100 Imaginative Cities of the Future Artworks

London 2063 (Image credit: Grivetart)

London2063Grivetart 100 Imaginative Cities of the Future Artworks

Magic Hour (Image credit: Benef)

MagicHourBenef 100 Imaginative Cities of the Future Artworks

Red Dawn (Image credit: Unfor54k3n)

RedDawnunfor54k3n 100 Imaginative Cities of the Future Artworks

Dome City (Image credit: PixelObsession)

domecitypixelobsession 100 Imaginative Cities of the Future Artworks

Future Of City (Image credit: Arielitem)

futureofcityarielitem 100 Imaginative Cities of the Future Artworks

Glide Down to the Future City (Image credit: ROMAgfx)

glidedowntothefuturecity 100 Imaginative Cities of the Future Artworks

A New City (Image credit: Dekus)

AnewcityDekus 100 Imaginative Cities of the Future Artworks

Mountain City (Image credit: ApneicMonkey)

mountaincityapneicmonkey 100 Imaginative Cities of the Future Artworks

Ship Highway (Image credit: PixelObsession)

shiphighwaypixelobsession 100 Imaginative Cities of the Future Artworks

Capital Megacity (Image credit: Julian399)

capitalmegacityjulian399 100 Imaginative Cities of the Future Artworks

Skypollution (Image credit: Izaskun)

skypollutionIzaskun 100 Imaginative Cities of the Future Artworks

Future-City Speedy (Image credit: Brehnman)

futurecityspeedybrehnman 100 Imaginative Cities of the Future Artworks

Plate City (Image credit: Farkwhad)

platecityfarkwhad 100 Imaginative Cities of the Future Artworks

Dwellings (Image credit: AdoC)

DwellingsAdoC 100 Imaginative Cities of the Future Artworks

Fallen Concept (Image credit: AdoC)

FallenConceptAdoC 100 Imaginative Cities of the Future Artworks

Vulcanae (Image credit: Gizmodus)

Vulcanaegizmodus 100 Imaginative Cities of the Future Artworks

Mirandopolis: Birdcage District (Image credit: Gizmodus)

MirandopolisBirdcageDistrict 100 Imaginative Cities of the Future Artworks

Rainy Dawn (Image credit: Voyager212)

RainyDawnVoyager212 100 Imaginative Cities of the Future Artworks

Sci-Fi City (Image credit: TomEdwardsConcepts)

scificity 100 Imaginative Cities of the Future Artworks

The Desert Labs (Image credit: Shadowtuga)

thedesertlabs 100 Imaginative Cities of the Future Artworks

Speedpaint_73 (Image credit: Concept-on-mac)

speedpaint73conceptonmac 100 Imaginative Cities of the Future Artworks

Glass Prison Sci-fi City (Image credit: GutsBerserk)

GlassPrisonScificityGutsBerserk 100 Imaginative Cities of the Future Artworks

Techno-Oasis (Image credit: Julian399)

technooasisjulian399 100 Imaginative Cities of the Future Artworks

Fast Food City (Image credit: PE-Travers)

FastfoodcityPETravers 100 Imaginative Cities of the Future Artworks

Plaza (Image credit: Guitfiddle)

Plazaguitfiddle 100 Imaginative Cities of the Future Artworks

Futuristic City (Image credit: Brehnman)

futuristiccitybrehnman 100 Imaginative Cities of the Future Artworks

The City (Image credit: Urielbeaupre)

thecityurielbeaupre 100 Imaginative Cities of the Future Artworks

Babylon (Image credit: Unfor54k3n)

Babylonunfor54k3n 100 Imaginative Cities of the Future Artworks

Vertical Urban Scrawl (Image credit: JakeMurray)

verticalurbanscrawl 100 Imaginative Cities of the Future Artworks

Mad City (Image credit: Nelson808)

MadCitynelson808 100 Imaginative Cities of the Future Artworks

The Rule of Law (Image credit: Arsdraw)

theruleoflawarsdraw 100 Imaginative Cities of the Future Artworks

City Design 1 (Image credit: Datamonkey-ultima)

CityDesign1Datamonkeyultima 100 Imaginative Cities of the Future Artworks

Future (Image credit: Mmmarcin)

Futuremmmarcin 100 Imaginative Cities of the Future Artworks

Edge of Precipice (Image credit: Taenaron)

EdgeofPrecipicetaenaron 100 Imaginative Cities of the Future Artworks

2210 (Image credit: 3yen)

22103yen 100 Imaginative Cities of the Future Artworks

Sun City (Image credit: Adimono)

suncityadimono 100 Imaginative Cities of the Future Artworks

The Future Harbor (Image credit: Yunhyunjung)

thefutureharboryunhyunjung 100 Imaginative Cities of the Future Artworks

City Towers (Image credit: Aksu)

CityTowersaksu 100 Imaginative Cities of the Future Artworks

Sci-fi City (Image credit: Diversebeing)

scificityDiversebeing 100 Imaginative Cities of the Future Artworks

The Three Sisters (Image credit: Nelson808)

THETHREESISTERSnelson808 100 Imaginative Cities of the Future Artworks

Spear City (Image credit: TheTrashCaretaker)

SpearCityTheTrashCaretaker 100 Imaginative Cities of the Future Artworks

Ballpoint City Digital Color (Image credit: RKGfXnl)

BallpointcitydigitalcolorRKGfXnl 100 Imaginative Cities of the Future Artworks

Canyon City (Image credit: AndreeWallin)

CanyoncityAndreeWallin 100 Imaginative Cities of the Future Artworks

Windy City (Image credit: Hideyoshi)

WindyCityHideyoshi 100 Imaginative Cities of the Future Artworks

City Night (Image credit: Molybdenumgp03)

citynightmolybdenumgp03 100 Imaginative Cities of the Future Artworks

Underwater City (Image credit: Lostsoul121)

UnderwaterCitylostsoul121 100 Imaginative Cities of the Future Artworks

The City of Dharchonia (Image credit: TateishiEigo)

ThecityofDharchoniaTateishiEigo 100 Imaginative Cities of the Future Artworks

Hidden City (Image credit: Molybdenumgp03)

hiddencitymolybdenumgp03 100 Imaginative Cities of the Future Artworks

Bridge City (Image credit: Loboto)

BRIDGECITYloboto 100 Imaginative Cities of the Future Artworks

Futuristic City (Image credit: Milkmom)

FuturisticCityMilkmom 100 Imaginative Cities of the Future Artworks

Visari Env 02 (Image credit: Ichitakaseto)

visarienv02ichitakaseto 100 Imaginative Cities of the Future Artworks

Temple (Image credit: Xenomorph-designs)

Templexenomorphdesigns 100 Imaginative Cities of the Future Artworks

City Lights (Image credit: Breaker213)

citylightsbreaker213 100 Imaginative Cities of the Future Artworks

Silence (Image credit: Nitro-killer)

silencenitrokiller 100 Imaginative Cities of the Future Artworks

Utopia (Image credit: Adimono)

utopiaadimono 100 Imaginative Cities of the Future Artworks

Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

In our earlier jQuery Mobile tutorial I had introduced much of the underlying framework and how to go about setting up your first website. The JS library is both lightweight and easy to pickup in regards to learning difficulty. There is also generic a CSS stylesheet included with the files so you can further customize the elements in your layout.

jquery mobile custom themes Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

For this second segment I’d like to spend a bit of time delving deeper into this idea of jQuery Mobile themes. The entire design industry has been revolutionized by jQM and the process of constructing a mobile template from scratch has been significantly improved. jQuery Mobile isn’t just a scripting library, but an entire ground framework to build upon and produce efficient mobile templates.

Default Stylesheet Contents

I should begin by clarifying exactly what type of CSS code is included with the default files. The stylesheet from jQM 1.0 has been split into two main segments – structure and themes.

The structure code is the stuff you can mostly ignore. This is used to set margins, padding, height/width, font variants, along with many other browser defaults. The internal themes are then split up from A-E which each control different visual effects in your design. This can include background colors, gradients, drop shadows, etc.

Each of these inner theme elements can also be referred to as swatches. When you build a mobile template you’ll generally stick with a single theme. But in almost every scenario the design can be improved upon with differing color schemes. The default stylesheet only includes swatches A-E but you can build swatches F-Z to add another 21 alternatives into your theme library. Just to clarify these terms again a theme is considered 1 single CSS file which can include up to 26 different swatches labeled A-Z.

Switching Styles

If you don’t choose to specify any swatches then jQuery Mobile will stick to the swatch A by default. If you weren’t already aware the jQuery Mobile docs utilize HTML5 data attributes for many internal functions. One of these includes changing swatches via the data-theme attribute. Check out my code example below to see what I mean.

<div data-role="page" id="mypage" data-theme="b">
  <div data-role="header">
    <h1>Default jQM Page</h1>
  </div>
  <div data-role="content">
    <p>Here is some internal content.</p>
    </div>
</div>

Notice that I placed the data-theme attribute on the root page div. This means the new swatch color will effect everything inside which includes both the header and content areas. I could additionally include data-theme="c" into the header div to change only that content from the rest of my page.

Components of a Swatch

It should be fairly straightforward how to implement these different swatches within a single layout. So now let’s take a look at the jQM CSS code so we can break down individual components of a swatch. Check out the latest jQuery Mobile 1.0 CSS file hosted on their own CDN.

You should notice how each swatch is separated by a distinct comment and each of the internal classes ends with the appropriate lettering. For example .ui-bar-a and .ui-body-a are applied into the header/footer bars and content areas by default. Most properties are implementing a reset on font and link colors, background gradients, and other small details. I included simply the ui-bar-a codes to give you an idea of which elements we target.

/* A
---------------------------------------------------------------------------------------------*/
.ui-bar-a {
	border: 1px solid #2A2A2A;
	background: #111111;
	color: #ffffff;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px #000000;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#3c3c3c, #111); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#3c3c3c, #111); /* FF3.6 */
	background-image:     -ms-linear-gradient(#3c3c3c, #111); /* IE10 */
	background-image:      -o-linear-gradient(#3c3c3c, #111); /* Opera 11.10+ */
	background-image:         linear-gradient(#3c3c3c, #111);
}
.ui-bar-a,
.ui-bar-a input,
.ui-bar-a select,
.ui-bar-a textarea,
.ui-bar-a button {
	font-family: Helvetica, Arial, sans-serif;
}
.ui-bar-a .ui-link-inherit {
	color: #fff;
}

.ui-bar-a .ui-link {
	color: #7cc4e7 /*{a-bar-link-color}*/;
	font-weight: bold;
}

.ui-bar-a .ui-link:hover {
	color: #2489CE /*{a-bar-link-hover}*/;
}

.ui-bar-a .ui-link:active {
	color: #2489CE /*{a-bar-link-active}*/;
}

.ui-bar-a .ui-link:visited {
    color: #2489CE /*{a-bar-link-visited}*/;
}

If you’re just looking to create a custom swatch I recommend basing the template off one of the originals. The process will go a whole lot smoother if you start writing codes in a new CSS document. You won’t have the hassle of editing in the original file and you can start off working on a clean slate. But the key areas you want to focus on will include the following:

  • header and footer bars
  • body content & page text
  • list styles
  • button states default/hover/active
  • form input controls(extra)

Coding a New Bar Design

From the same CSS file we looked at earlier copy/paste all the swatch A code(lines 12-150) into a new file. We can use the swatch name G to implement these new styles. Now after copying the code you want to rename each class instance ending in -a to -g, as this is how jQuery Mobile will recognize which styles to use.

I’d like to start by redesigning the header bar bg to mimic a more familiar iOS gradient. This can be done solely within the .ui-bar-g selector. We want to edit the background and background-image properties to change up the gradient effects. Check out my code below and a demo screen of the new gradient.

.ui-bar-g {
	border: 1px solid #2d3033 /*{a-bar-border}*/;
	border-left: 0px;
	border-right: 0px;
	background: #6d83a1;
	color: #fff /*{a-bar-color}*/;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px /*{a-bar-shadow-radius}*/ #3e4957;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#b4bfce), color-stop(0.5, #899cb3), color-stop(0.505, #7e94b0), to(#6d83a1));
	background-image: -webkit-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* IE10 */
	background-image:      -o-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1);
}

blue ios jquery mobile gradient Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

I’m using the blue color scheme found in most default iOS applications. My background is initially set to a solid color for devices which can’t render CSS3 gradients. Then below I’m using color stops around the 50% marker to recreate the traditional Apple-style glossy shine effect. Also inside the same selector I’ve slightly modified the text shadow with a more subtle color and range.

Buttons and Text Effects

It’s important when coding swatches to consider specifically which areas of the interface need attention. The header bar looks great with this new background, but one last modification I’d like to make will match the button styles closer to that of iOS apps.

.ui-btn-up-g {
	border: 1px solid #375073;
	background: #4a6c9b;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#89a0be), color-stop(0.5, #5877a2), color-stop(0.505, #476999), to(#4a6c9b));
	background-image: -webkit-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* IE10 */
	background-image:      -o-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

.ui-btn-up-g .ui-btn-inner, .ui-btn-hover-g .ui-btn-inner, .ui-btn-down-g .ui-btn-inner { border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.ui-btn-hover-g {
	border: 1px solid #1b49a5;
	background: #2463de;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#779be9), color-stop(0.5, #376fe0), color-stop(0.505, #2260dd), to(#2463de));
	background-image: -webkit-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* IE10 */
	background-image:      -o-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

jqm topbar with buttons Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

The code area we’re editing now is within the UI button classes. There are 3 different modes to be concerned with: .ui-btn-up-g, .ui-btn-hover-g, and .ui-btn-down-g. I’m mostly focusing on the standard(btn-up) and hover(btn-hover) effects by editing the box shadow and linear gradients. Also I expanded the rounded corners effect so the buttons appear more rectangular.

Because of this I’ve needed to remove the inner border radius from a class titled .ui-btn-inner. This class gets attached onto a span element within each anchor link in your header bar. Without resetting the border radius properties you’ll notice small glitches in the design whenever you hover over a button. As you spend more time coding in jQuery Mobile themes you’ll memorize these little nuances for future projects.

Introduction to ThemeRoller

If you enjoy getting your hands dirty in code then I highly recommend sticking to custom edits. Not only do you have more control but it’s a lot easier to debug issues within the CSS if you made all the edits yourself. But for many designers this process is tiresome and will simply take longer than necessary. Luckily the jQuery Mobile team has released an online editor under the name ThemeRoller.

jquery themeroller Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

From this page you have access to edit the first 3 A-C swatches or even create one of your own. If you look in the left sidebar you can switch between these 3 settings or quickly make changes to the global theme options. These include CSS properties such as border radii, box shadows, or default page fonts. Notice as you select any of the preset swatches that we can edit only the same areas as before – top/bottom bars, body content, and the 3 button states.

adobe kuler Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

But my favorite feature has to be the direct access to Adobe Kuler swatches. You can actually create a few color schemes within your Kuler account and import them into ThemeRoller. The interface supports drag-and-drop functionality so it’s real simple to try out a few different ideas in a matter of minutes.

Ultimately there is no absolute method of properly building your jQM swatches. Some designers prefer to hard code CSS while others will love the intuitive ThemeRoller web app. As long as you’re following the class structure then you should get the same results either way. If you want to read up a bit on ThemeRoller check out this featured jQuery Mobile blog post regarding their newest web tool and its many features.

Helpful Resources

Mobile Design Showcase

What better way to wrap up our guide to jQuery Mobile themes than with a small inspiration showcase? Hundreds of web designers have submitted their themes into the jQM Gallery with some notable success. Check out these astounding mobile templates below which will hopefully stir up your own creative ambitions. And be sure to let us know your thoughts or questions in the post discussion area.

Thumbpark

01 thumbpark Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Elfster

02 elfster Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Let’s GO! Gorizia

03 lets go gorizia Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Woos.at

04 woost Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

iFilmtipset

05 ifilm tipset Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

BAMM.TV

06 bammtv Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Untappd

07 untappd Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

IOUMate

08 ioumate Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Disney Dream Portraits

09 disney dream portraits Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Cookpad

10 cookpad Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Dailymotion

11 dailymotion Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

American Century

12 american century Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Travel Wisconsin

13 travel wisconsin Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Tuscan Maremma

14 tuscan antico casale Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

My Shopping List

15 shopping list Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

twwit

16 twwit Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Take Me Fishing

17 take me fishing Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Lawline Mobile

18 lawline Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

In our earlier jQuery Mobile tutorial I had introduced much of the underlying framework and how to go about setting up your first website. The JS library is both lightweight and easy to pickup in regards to learning difficulty. There is also generic a CSS stylesheet included with the files so you can further customize the elements in your layout.

jquery mobile custom themes Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

For this second segment I’d like to spend a bit of time delving deeper into this idea of jQuery Mobile themes. The entire design industry has been revolutionized by jQM and the process of constructing a mobile template from scratch has been significantly improved. jQuery Mobile isn’t just a scripting library, but an entire ground framework to build upon and produce efficient mobile templates.

Default Stylesheet Contents

I should begin by clarifying exactly what type of CSS code is included with the default files. The stylesheet from jQM 1.0 has been split into two main segments – structure and themes.

The structure code is the stuff you can mostly ignore. This is used to set margins, padding, height/width, font variants, along with many other browser defaults. The internal themes are then split up from A-E which each control different visual effects in your design. This can include background colors, gradients, drop shadows, etc.

Each of these inner theme elements can also be referred to as swatches. When you build a mobile template you’ll generally stick with a single theme. But in almost every scenario the design can be improved upon with differing color schemes. The default stylesheet only includes swatches A-E but you can build swatches F-Z to add another 21 alternatives into your theme library. Just to clarify these terms again a theme is considered 1 single CSS file which can include up to 26 different swatches labeled A-Z.

Switching Styles

If you don’t choose to specify any swatches then jQuery Mobile will stick to the swatch A by default. If you weren’t already aware the jQuery Mobile docs utilize HTML5 data attributes for many internal functions. One of these includes changing swatches via the data-theme attribute. Check out my code example below to see what I mean.

<div data-role="page" id="mypage" data-theme="b">
  <div data-role="header">
    <h1>Default jQM Page</h1>
  </div>
  <div data-role="content">
    <p>Here is some internal content.</p>
    </div>
</div>

Notice that I placed the data-theme attribute on the root page div. This means the new swatch color will effect everything inside which includes both the header and content areas. I could additionally include data-theme="c" into the header div to change only that content from the rest of my page.

Components of a Swatch

It should be fairly straightforward how to implement these different swatches within a single layout. So now let’s take a look at the jQM CSS code so we can break down individual components of a swatch. Check out the latest jQuery Mobile 1.0 CSS file hosted on their own CDN.

You should notice how each swatch is separated by a distinct comment and each of the internal classes ends with the appropriate lettering. For example .ui-bar-a and .ui-body-a are applied into the header/footer bars and content areas by default. Most properties are implementing a reset on font and link colors, background gradients, and other small details. I included simply the ui-bar-a codes to give you an idea of which elements we target.

/* A
---------------------------------------------------------------------------------------------*/
.ui-bar-a {
	border: 1px solid #2A2A2A;
	background: #111111;
	color: #ffffff;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px #000000;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#3c3c3c, #111); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#3c3c3c, #111); /* FF3.6 */
	background-image:     -ms-linear-gradient(#3c3c3c, #111); /* IE10 */
	background-image:      -o-linear-gradient(#3c3c3c, #111); /* Opera 11.10+ */
	background-image:         linear-gradient(#3c3c3c, #111);
}
.ui-bar-a,
.ui-bar-a input,
.ui-bar-a select,
.ui-bar-a textarea,
.ui-bar-a button {
	font-family: Helvetica, Arial, sans-serif;
}
.ui-bar-a .ui-link-inherit {
	color: #fff;
}

.ui-bar-a .ui-link {
	color: #7cc4e7 /*{a-bar-link-color}*/;
	font-weight: bold;
}

.ui-bar-a .ui-link:hover {
	color: #2489CE /*{a-bar-link-hover}*/;
}

.ui-bar-a .ui-link:active {
	color: #2489CE /*{a-bar-link-active}*/;
}

.ui-bar-a .ui-link:visited {
    color: #2489CE /*{a-bar-link-visited}*/;
}

If you’re just looking to create a custom swatch I recommend basing the template off one of the originals. The process will go a whole lot smoother if you start writing codes in a new CSS document. You won’t have the hassle of editing in the original file and you can start off working on a clean slate. But the key areas you want to focus on will include the following:

  • header and footer bars
  • body content & page text
  • list styles
  • button states default/hover/active
  • form input controls(extra)

Coding a New Bar Design

From the same CSS file we looked at earlier copy/paste all the swatch A code(lines 12-150) into a new file. We can use the swatch name G to implement these new styles. Now after copying the code you want to rename each class instance ending in -a to -g, as this is how jQuery Mobile will recognize which styles to use.

I’d like to start by redesigning the header bar bg to mimic a more familiar iOS gradient. This can be done solely within the .ui-bar-g selector. We want to edit the background and background-image properties to change up the gradient effects. Check out my code below and a demo screen of the new gradient.

.ui-bar-g {
	border: 1px solid #2d3033 /*{a-bar-border}*/;
	border-left: 0px;
	border-right: 0px;
	background: #6d83a1;
	color: #fff /*{a-bar-color}*/;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px /*{a-bar-shadow-radius}*/ #3e4957;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#b4bfce), color-stop(0.5, #899cb3), color-stop(0.505, #7e94b0), to(#6d83a1));
	background-image: -webkit-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* IE10 */
	background-image:      -o-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1);
}

blue ios jquery mobile gradient Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

I’m using the blue color scheme found in most default iOS applications. My background is initially set to a solid color for devices which can’t render CSS3 gradients. Then below I’m using color stops around the 50% marker to recreate the traditional Apple-style glossy shine effect. Also inside the same selector I’ve slightly modified the text shadow with a more subtle color and range.

Buttons and Text Effects

It’s important when coding swatches to consider specifically which areas of the interface need attention. The header bar looks great with this new background, but one last modification I’d like to make will match the button styles closer to that of iOS apps.

.ui-btn-up-g {
	border: 1px solid #375073;
	background: #4a6c9b;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#89a0be), color-stop(0.5, #5877a2), color-stop(0.505, #476999), to(#4a6c9b));
	background-image: -webkit-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* IE10 */
	background-image:      -o-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

.ui-btn-up-g .ui-btn-inner, .ui-btn-hover-g .ui-btn-inner, .ui-btn-down-g .ui-btn-inner { border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.ui-btn-hover-g {
	border: 1px solid #1b49a5;
	background: #2463de;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#779be9), color-stop(0.5, #376fe0), color-stop(0.505, #2260dd), to(#2463de));
	background-image: -webkit-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* IE10 */
	background-image:      -o-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

jqm topbar with buttons Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

The code area we’re editing now is within the UI button classes. There are 3 different modes to be concerned with: .ui-btn-up-g, .ui-btn-hover-g, and .ui-btn-down-g. I’m mostly focusing on the standard(btn-up) and hover(btn-hover) effects by editing the box shadow and linear gradients. Also I expanded the rounded corners effect so the buttons appear more rectangular.

Because of this I’ve needed to remove the inner border radius from a class titled .ui-btn-inner. This class gets attached onto a span element within each anchor link in your header bar. Without resetting the border radius properties you’ll notice small glitches in the design whenever you hover over a button. As you spend more time coding in jQuery Mobile themes you’ll memorize these little nuances for future projects.

Introduction to ThemeRoller

If you enjoy getting your hands dirty in code then I highly recommend sticking to custom edits. Not only do you have more control but it’s a lot easier to debug issues within the CSS if you made all the edits yourself. But for many designers this process is tiresome and will simply take longer than necessary. Luckily the jQuery Mobile team has released an online editor under the name ThemeRoller.

jquery themeroller Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

From this page you have access to edit the first 3 A-C swatches or even create one of your own. If you look in the left sidebar you can switch between these 3 settings or quickly make changes to the global theme options. These include CSS properties such as border radii, box shadows, or default page fonts. Notice as you select any of the preset swatches that we can edit only the same areas as before – top/bottom bars, body content, and the 3 button states.

adobe kuler Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

But my favorite feature has to be the direct access to Adobe Kuler swatches. You can actually create a few color schemes within your Kuler account and import them into ThemeRoller. The interface supports drag-and-drop functionality so it’s real simple to try out a few different ideas in a matter of minutes.

Ultimately there is no absolute method of properly building your jQM swatches. Some designers prefer to hard code CSS while others will love the intuitive ThemeRoller web app. As long as you’re following the class structure then you should get the same results either way. If you want to read up a bit on ThemeRoller check out this featured jQuery Mobile blog post regarding their newest web tool and its many features.

Helpful Resources

Mobile Design Showcase

What better way to wrap up our guide to jQuery Mobile themes than with a small inspiration showcase? Hundreds of web designers have submitted their themes into the jQM Gallery with some notable success. Check out these astounding mobile templates below which will hopefully stir up your own creative ambitions. And be sure to let us know your thoughts or questions in the post discussion area.

Thumbpark

01 thumbpark Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Elfster

02 elfster Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Let’s GO! Gorizia

03 lets go gorizia Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Woos.at

04 woost Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

iFilmtipset

05 ifilm tipset Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

BAMM.TV

06 bammtv Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Untappd

07 untappd Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

IOUMate

08 ioumate Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Disney Dream Portraits

09 disney dream portraits Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Cookpad

10 cookpad Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Dailymotion

11 dailymotion Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

American Century

12 american century Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Travel Wisconsin

13 travel wisconsin Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Tuscan Maremma

14 tuscan antico casale Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

My Shopping List

15 shopping list Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

twwit

16 twwit Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Take Me Fishing

17 take me fishing Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Lawline Mobile

18 lawline Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Networking Guide for Bloggers: Why It Is Important (Part 1)

In today’s blogosphere a lot of discussion is going on about various aspects of positioning and growing a blog. Even though the space gets more and more crowded every day, and the game is changing constantly, there are still some things everyone tells you to do – things considered as mandatory for any kind of success.

networking 01 Networking Guide for Bloggers: Why It Is Important (Part 1)

Among various aspects of promotion, advertising, search engine optimization, social media, and all kinds of other stuff lies the need of contacting other, fellow bloggers, and being in touch with people in general.

Quick note:
This post is the first and a part of a series titled – Networking Guide for Bloggers. Be sure to check back next week for more!

Networking?

Networking is a fancy term, and one that I don’t especially like, to be honest. It strips the whole experience of interacting with other people from all emotion and personal aspects.

Networking sounds strictly “businessy,” which simply doesn’t give a good impression. Reaching out to others, or even making friends are a lot better terms here.

Anyway, we all know that meeting new people is essential for both our own and our blogs’ growth, however in many cases we don’t know how to make the initial step, in a way that we don’t get burned from the get go.

By the way, sending an email with a subject like “link exchange proposition for X” is not an optimal solution! (Please, stop sending me those.)

Furthermore, getting in touch with other people can be even more challenging for people not speaking English natively (myself included). And even when you are a native English speaker it’s not much easier anyway.

Challenges of networking over the internet

You see, communicating with anyone over the internet consists mostly of writing. Essentially, written communication is just that – written, so things like using certain words, and proper punctuation are especially important.

For instance, when you are speaking to someone in person, your tone, voice, and volume of speech create more than 50% of the message, I’d say, but when you are writing the same message none of these things can be used. That’s why there’s so much room for misinterpretation and misunderstanding. And I’m sure the last thing you want is to sound aggressive or maybe even offensive.

networking phone Networking Guide for Bloggers: Why It Is Important (Part 1)

(Image source: Fotolia)

And then there’s the problem of building up the relationship along with time… not asking anyone to marry you too soon, so to speak.

What I mean here is that most of the time, asking a stranger for help doesn’t work. Simply because they don’t care about you. But asking a friend for help works almost every time. How to turn strangers into friends?

Well, the challenge of making new connections online has to be tackled from more than just a single angle, and this is exactly what we’re trying to do in this series.

What is networking?

As I said earlier, I don’t like the word networking. However, I think I’ll continue using it anyway, purely because it’s a single word, and it’s much easier to apply then a two or three word description.

Anyway, networking is not about getting hundreds of pointless business cards during an event. And it’s not about sending hundreds of spam emails in hope that one or two will get a response. So what is it about then?

meeting people Networking Guide for Bloggers: Why It Is Important (Part 1)
(Image source: Fotolia)

For me, networking is the art of meeting new people. Both in the real world and in the online there can be multiple reasons why you want to meet a specific person. It can be business, romance, friendship, let’s-have-a-beer, or whatever else. Here, of course, we’re talking blogging and growing your blog. But blogging is neither purely business nor purely social. It lies somewhere in between.

This makes it particularly difficult because in a purely business-like communication you can send an email starting with “Dear Sir, I’m writing to you to propose my blah blah blah.” In a social relation, on the other hand, you can start with “hey dude, how is U today? Wanna meet 2nite? Blah blah blah.” And in blogging neither one of these is acceptable.

Benefits of networking

Big part of this is obvious. The benefit is that you meet other, likeminded people. So what’s the point of meeting new people? – That’s the question we should be asking.

First of all, there are very few blogs or websites that grew into mainstream popularity all by themselves. Most of the popular sites gained their popularity due to the popularity of other sites. By ways of borrowing it.

Borrowing popularity is a fancy sounding term, but essentially it boils down to getting multiple mentions on other sites. It can happen by obtaining backlinks, being featured in interviews, contacting the webmasters directly, or thousands of other ways.

However, one fact remains, no one, not one webmaster/blogger/website owner will mention you or your site if they don’t have any amount of trust in you and what you do.

being popular Networking Guide for Bloggers: Why It Is Important (Part 1)
(Image source: Fotolia)

You see, it’s easy to mention and link to sites that are already popular – those that have a massive amount of social proof working for them. For instance, if you see a new product at Problogger you don’t need to hesitate whether you can link to it or not. You don’t have to be afraid that the product will turn out awful and people will be very mad at you for pointing them to it. You know that Darren produces great stuff, to some degree you trust him, and he seems like a credible person … the social proof simply does its job for him.

But if you stumble upon something new, you find it a lot more difficult to endorse such a thing or even link to it … “what if it turns out a scam?” … “what if the site disappears tomorrow?” and so on.

It all becomes a cycle of death, so to speak. Here’s the cycle: If you’re just starting out you can’t get no one to endorse you because no one knows you because you’re just starting out. So what’s the best way out of this cycle?

Yes, you guessed it – networking. By networking with others you can break the cycle at the point of “no one knows you,” and then, sooner or later, all the other pieces shall fall as well.

Borrowing popularity through networking

Ultimately, once you know some people you can borrow their popularity to build your own, and that’s a big benefit.

Don’t believe me? Try to imagine what a plain endorsement from both Darren Rowse and Hongkiat would do for your business. I mean, the case where they both say “go there and buy.” Of course, getting it won’t be easy, but I just needed an example.

All I’m trying to explain here is that building relationships with other fellow bloggers and website owners is the best thing you can do for your online presence. There’s nothing that will do a better job at keeping you on the radar.

You can work on SEO, social media, advertising and all the other tools, but these are all things that greatly depend on other company’s opinion of you.

networking globe Networking Guide for Bloggers: Why It Is Important (Part 1)

(Image source: Fotolia)

For instance, if you build a good position on Google, but one day you get dropped due to an algorithm update, the next day you wake up with nothing. If Facebook or Google shuts down your advertising campaign same thing happens.

But still, no matter what happens you can work with your network of contacts, participate in their projects, do joint ventures, make partnerships, and so on. Essentially, you’re making friends, and I’m sure I don’t need to explain the value of that.

Moreover, by working with other people you’re positioning yourself alongside them. So whenever a complete stranger is considering whether to promote your new product this social proof is something that is very likely to work in your favor.

When people can see that you’ve been working with “Mr. Authority” in your niche then some of that person’s credibility falls on you. Something along the lines of: “if they’ve been working with X then they must be the real deal.”

If you work on this consistently then you can build up your brand in a relatively short span of time. And I’m not saying that anything will get you overnight results here. You still have to be able to put some serious work, but the benefits make it worth the effort.

Is blogging really a strictly online thing?

Even though blogging or blogging as a business seems like a purely online activity it’s not exactly like that. Most of the things happen online, that’s true – you’re publishing your content on the internet, and interacting with other people via various online services, and so on. However, the basic offline world’s principles of growing your venture/business still apply. And the online world didn’t change anything, it just made certain things easier to do.

For instance, the whole concept of networking is nothing new. However, since the internet is around you don’t have to leave your home, and you can connect with multiple people at the same time, but the whole idea still remains the same. And it’s not much different from what your father or grandfather used to do over the phone.

In essence, I think networking is that valuable because people don’t like to do business with companies, or websites … they like to do business with other people. Until you introduce yourself to your online community nothing significant is going to happen in terms of your brand going viral. If you don’t do this yourself no one will bother to take this step for you.

This concludes the first part of the series, next week we’ll have a word on setting goals for networking. Until then don’t forget to subscribe to get the posts delivered straight to your inbox.

Lastly, feel free to tell me what you think about the whole concept. Do you find networking valuable? Which side you’re on – do you think that who you know matters more than what you know, or the other way around?

How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Today we are going to do some photo manipulation with Photoshop. In the tutorial below, we are going to guide you through patching up spots in an old black & white photo and then colorizing it.

color old photo preview How to Colorize Old (Black & White) Photo [Photoshop tutorial]

First we’ll run you through on removing white patches from photo and then we’ll proceed to coloring it. The steps are pretty standard. Load up your Photoshop, and off we go.

To follow through the entire tutorial, we suggest you download and use the following image.

Inital image How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 1

We’ll start by removing the white patches on the image. Choose Clone Stamp Tool and by pressing Alt key pick the plain and appropriate surface near all white patches and apply it on white patch. Continue this process until all patches get removed.

After removing all patches your poor image will look clean as shown in image:

1 Clean image no white patch How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 2

Next, we’ll proceed with coloring the image. It would be bad idea to colorize the image as a whole; we’ll do them one by one, an object at a time.

First, we’ll select the hat by making the use of Magnetic Lasso Tool – like this:

2 Selection of Hat How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 3

To colorize it, we will use the Hue and Saturation (HSL) option. There are many ways to colorize an object, but HSL is perhaps one of the easiest and most flexible.

Proceeding to colorizing the hat, add these values to the (HSL) 360, 35, – 26 appropriately. (While using HSL, on that window, do not forget to turn on Colorize option.)

Applying HSL to hat How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 4

After applying color, the hat may look a little plain. Let’s add some Noise to it. Select Filters -> Noise -> Add Noise and give amount "5" to it.

Check Monochromatic option to get a smoother noise effect. See the next image for its differences.

Applying Noise How to Colorize Old (Black & White) Photo [Photoshop tutorial]

3 Hat color How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 5

Next, the coat. The process is same – only different HSL values, which are respectively: 42, 10, – 63.

To make the overall look of coat more natural, instead of using Noise tool, we take advantage of Grain Texture option. You can find it under Filter -> Filter Gallery -> in Texture tab -> Grain.

Select the following options – Intensity: "10", Contrast: "50" and Grain Type: "Soft".

4 Coat Grain Texture How to Colorize Old (Black & White) Photo [Photoshop tutorial]

And then you will see the output:

5 Coat color and Texture How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 6

Moving forward – the shoes. To give shoes a shiny effect, we are going to use Image menu -> Adjustments -> Variations. Select "Midtones" and click Ok.

6 Boots Variations How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Try some combination of CMYK colors until you get a boot of this color:

7 Boots Color How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 7

Next up, the door. First, let’s color the door borders.

8 Indoor borders of the door How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Select one side border of door by using Rectangle Marquee Tool. Add 15, 45, -53 values in HSL tool. Then select Filter -> Filter Gallery -> in Texture tab -> select Grain option and keep Intensity: "12", Contrast: "50" select Grain type: "Enlarged".

Follow the same procedure to all the borders of the door.

9 Coloring Indoor borders of the door How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 8

Next, we proceed to coloring rectangles between the doors with the following HSL values: 55, 20, -26 and in Texture Grain, keep intensity: "12", contrast: "50" and Grain type: "Enlarged".

10 Coloring rectangles of the door How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 9

We’ll wrap up coloring the door by adding colors to the borders, HSL values of : 25, 7, -69. Then under Texture Grain keep Intensity: "12", Contrast: "50", and let’s add extra noise by selecting Grain type: "Regular".

11 Coloring Outside borders of door How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 10

After the door, we proceed coloring the soil. To color the soil, select that portion by using Magic Wand Tool and then keep HSL values: 20, 24, -56.

12 Coloring the soil How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Step 11

Last but not least, we will color the wooden background of the image. To give it a it a wood look and feel, we give it a HSL value of: 31, 53, -45, and then add Noise "5" by checking the Monochromatic option.

After all this procedures finally you will see the output like this:

13 Wooden background How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Color Correction

We are done coloring the image. Now, we proceed to the final and most important part – color correction. Color correction when done right, will give image its correct mood and make it more realistic.

To increase the brightness of the image, we go to the following option: Image menu -> Adjustments -> Curves, and add "186" for Output and "164" for Input.

Use of Curves Tool How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Let’s brighten up the following section of the image (where arrow in pointed to). First we select the portion with Rectangle Marquee tool. Then go to Filter -> Filter Gallery -> Distort tab and select Diffuse Glow with the following values: Graininess: "0", Glow Amount: "11", Clear Amount: "15". And finally, proceed to Image menu -> Adjustments -> Curves and add "200" for Ouptut and "188" for Input.

14 Selection of image How to Colorize Old (Black & White) Photo [Photoshop tutorial]

Follow the above process for the remaining parts of image but with different values in Diffuse Glow: Graininess: "2", Glow Amount: "5", Clear Amount: "15". Curves’ not required.

To darken the shadows of the hat and the coat, let’s use the Burn Tool and by selecting Range: Midtones and decreasing the Exposure value to "20%" apply it on shadows part appropriately.

We’ll use the Dodge Tool to brighten up the coat and hat so it looks as though the lights are coming in from the right side, and to give a sense of thickness for the door borders, we use the Burn Tool.

And here’s how your final output will look like (or similar) after some color corrections.

15 Final Ouput How to Colorize Old (Black & White) Photo [Photoshop tutorial]

How To Create CSS-Based Content Accordion

In today’s tutorial we are going to learn how we can create a horizontal and vertical content accordion by just using CSS3. There are many jQuery plugins out that can do this job for you but what do you do if the visitor has Javascript turned off, then the accordion won’t work correctly. If your accordion is purely in CSS then it will work for all your visitors.

We are going to create a horizontal and vertical content accordion. On clicking the headline text the slide will open displaying the full content, and here’s a quick preview (screenshots) how they look like.

css based accordion How To Create CSS Based Content Accordion

Like what you see? Let the coding begin!

1. Preparing HTML and Content

To start with we are going to create the HTML for the accordion.

The structure needs a container div and then have a section for each slide in the accordion. In this example we are going to have 5 slides. Each of the slides are going to have a title and a paragraph for the content.

<div class="accordion horizontal">
    <section>
        <h2>About Us</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
    </section>

    <section>
        <h2>Services</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
    </section>

    <section>
        <h2>Blog</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
    </section>

    <section>
        <h2>Portfolio</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
    </section>

    <section>
        <h2>Contact</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
    </section>
</div>

Now we have our slides we can begin to style the accordion.

2. CSS Styling

First we need to style the containing div of the accordion. This will give us an idea of how to display each of the slides and each of the headlines.

/*Define Accordion box*/
.accordion {
     width:830px;
     overflow:hidden;
     margin:10px auto;
     color:#474747;
     background:#414141;
     padding:10px;
}

Next we are going to create the headlines for each of the slides.

.accordion section{
      float:left;
      overflow:hidden;
      color:#333;
      cursor:pointer;
      background: #333;
      margin:3px;
}
.accordion section:hover {
      background:#444;
}

We are setting the background color to be dark grey on the section to be the headline where the visitors will click to display the slide. We are using this section for both the headline and the content which means we are able to use less HTML and reuse the title of the slide as the headline of the content.

.accordion section p {
      display:none;
}

At the moment all the slides will be closed so we need to make sure that the paragraph is hidden from view until the slide is open, so for now set the display of the paragraph to none.

.accordion section:after{
      position:relative;
      font-size:24px;
      color:#000;
      font-weight:bold;
}
.accordion section:nth-child(1):after{ content:'1'; }
.accordion section:nth-child(2):after{ content:'2'; }
.accordion section:nth-child(3):after{ content:'3'; }
.accordion section:nth-child(4):after{ content:'4'; }
.accordion section:nth-child(5):after{ content:'5'; }

With the slides closed we want to display a number at the bottom of the headline to say which number slide we are on. For this we are going to use CSS to add content after the section headline, this can be done by using the :after pseudo-class selector.

Now we have created the headline for the slide we can make the click event to display the slide in the accordion. But there is a problem, CSS doesn’t have a click event, which is why the accordion is normally created by using jQuery so we can attach a click event to the headline text.

We need to mimic the click event in CSS which can be done by using the :target pseudo-class selector.

3. Using :target pseudo-class Selector

:target allows us to style the fragment identifier. Sometimes we use an on-page anchor tag to point to a place on the page. On clicking the link the id in the anchor tag becomes the target and you can style this by using the :target selector.

To add this into the accordion we need to add a link around the headline pointing to an id of the slide.

<section id="about">
	<h2><a href="#about">About Us</a></h2>
	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id lobortis massa. Nunc viverra velit leo, sit amet elementum mi. Fusce posuere nunc a mi tempus malesuada. Curabitur facilisis rhoncus eros eget placerat. Aliquam semper mauris sit amet justo tempor nec lacinia magna molestie. Etiam placerat congue dolor vitae adipiscing. Aliquam ac erat lorem, ut iaculis justo. Etiam mattis dignissim gravida. Aliquam nec justo ante, non semper mi. Nulla consectetur interdum massa, vel porta enim vulputate sed. Maecenas elit quam, egestas eget placerat non, fringilla vel eros. Nam vehicula elementum nulla sed consequat. Phasellus eu erat enim. Praesent at magna non massa dapibus scelerisque in eu lorem.</p>
</section>
.accordion section:target {
      background:#FFF;
      padding:10px;
}
.accordion section:target:hover {
      background:#FFF;
}
.accordion section:target h2 {
      width:100%;
}
.accordion section:target h2 a{
      color:#333;
      padding:0;
}
.accordion section:target p {
      display:block;
}
.accordion section h2 a{
      padding:8px 10px;
      display:block;
      font-size:16px;
      font-weight:normal;
      color:#eee;
      text-decoration:none;
}

The above code will change the size of the slide to fit the rest of the accordion and changes the background color to white. The paragraph was hidden so now on target we need to display the paragraph.

Now when you click on the headline of the accordion the slide will change style to display the content of the slide.

4. Horizontal Accordion

The above code will create the general accordion now we can start to make the CSS changes for the differences between the horizontal and vertical accordion. Both these accordions have the same functionality but the headline styling would be different.

.horizontal section{
      width:5%;
      height:250px;
      -moz-transition: width 0.2s ease-out;
      -webkit-transition:width 0.2s ease-out;
      -o-transition:width 0.2s ease-out;
      transition:width 0.2s ease-out;
}

First we set the width of the headline section to 5% so it is a closed slide. As the section is both the headline and the content for the slide we need to add the animation to display the content by using the transition property.

/*Position the number of the slide*/
.horizontal section:after{
      top:140px;
      left:15px;
}

The position of the number on the slide will be the same position on each closed headline these are positioned differently to the vertical headlines.

/*Header of closed slide*/
.horizontal section h2 {
     -webkit-transform:rotate(90deg);
     -moz-transform:rotate(90deg);
     -o-transform: rotate(90deg);
     transform: rotate(90deg);
     width:240px;
     position:relative;
     left:-100px;
     top:85px;
}
/*On mouse over open slide*/
.horizontal :target{
     width:73%;
     height:230px;
}
.horizontal :target h2{
     top:0px;
     left:0;
     -webkit-transform:rotate(0deg);
     -moz-transform:rotate(0deg);
     -o-transform: rotate(0deg);
     transform: rotate(0deg);
}

The above code will change the size of the slide to fit the rest of the accordion. The headline was rotated vertically to run down the headline but now with the slide open we need to change the text back to be horizontal by rotating the text back to 0 degrees.

accordion horizontal How To Create CSS Based Content Accordion

5. Vertical Accordion

The vertical accordion works the same way as the horizontal accordion except we need to change the height instead of the width and we don’t need to change the alignment of the text.

.vertical section{
     width:100%;
     height:40px;
     -webkit-transition:height 0.2s ease-out;
     -moz-transition:height 0.2s ease-out;
     -o-transition:height 0.2s ease-out;
     transition:height 0.2s ease-out;
}

/*Set height of the slide*/
.vertical :target{
     height:250px;
     width:97%;
}

On the target event of the vertical accordion we are going to change the height of the headline to display the slide.

.vertical section h2 {
     position:relative;
     left:0;
     top:-15px;
}
/*Set position of the number on the slide*/
.vertical section:after{
      top:-60px;
      left:810px;
}
.vertical section:target:after{
      left:-9999px;
}

The above will change the position of the headline text on the closed slide. With the closed slide we need to set the position of the number which is located on the right of the accordion. When the slide is open we need to hide this number on headline when the target is set so we change the left position off the screen.

accordion vertical How To Create CSS Based Content Accordion

Now when you click on the headline of the accordion the slide will change style to display the content of the slide.

Demo & Download

View the demo to see this code in action or download the files to see how it’s all put together, or download the file and browse them offline.

28 Anti SOPA/PIPA Artworks and Memes [Pics]

If 2012 is really the end of the world, SOPA (Stop Online Piracy Act) could be the first sign. Though it is constructed in the way that it might protect the intellectual property from the possible copyright infringement, it is so powerful that the big industry players could even take down a website first without any investigation, and this is called Domain Name System Blocking. Basically it has no much difference from the censorship seen in certain countries.

anti sopa artwork 28 Anti SOPA/PIPA Artworks and Memes [Pics]
(Image Source: sakimichan)

The great news is that the DNS blocking feature is finally intended to be discussed by the sponsor of the SOPA bill, which could mean the semi-victory of the Anti-SOPA people. Today, we’re still in the great war, that’s why we want to showcase to you a collection of precious anti-SOPA artworks from the brave people who fought for American’s freedom of speech.

While the war against the SOPA and PIPA hasn’t ended, we can understand more about the SOPA from these quality works, and even share them to the world to let every people stand up to fight for the American’s freedom of speech, and to protect user-centered sites like Google, YouTube or deviantArt from being taken down or censored! Full list of fearless artworks after jump!

SOPA: The Internet Blacklist Bill. First one of the list is the infographic from Stop American Censorship website to help you understand more about the SOPA, and how it will severe the American’s freedom of speech and potentially industry. If you’re an American, join the strike! (Image Source: Stop American Censorship)

sopa the internet blacklist bill 28 Anti SOPA/PIPA Artworks and Memes [Pics]

SOPA Infographic. Another infographic that focuses more about how SOPA will influence the business and innovation, and ultimately what we can do to stop the SOPA. Be noted that the SOPA supporters could change from time to time though. (Image Source: Business Insurance)

sopa infographic 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Anti-Protect IP Act. Though the DNS blocking feature of SOPA has been proposed to be discussed, we must remember the similar version of SOPA, the PIPA! Again you can join the strike to bring it down! (Image Source: Neoridgeback)

anti protect ip act 28 Anti SOPA/PIPA Artworks and Memes [Pics]

I Can’t Hear You. So Rep. Lamar Smith is the author of the SOPA, according to the Wikipedia. (Image Source: ChadRocco)

i cant hear you 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Fight SOPA. Awesome modified version of The Social Network’s movie poster, and the message is the truth! (Image Source: lapdog)

fight sopa 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Image Violated SOPA. If SOPA is passed, this is what we will see often in our future. (Image Source: kisa4ever13)

image violated sopa 28 Anti SOPA/PIPA Artworks and Memes [Pics]

We Hope You Have Enjoyed. Now it’s your time to fight for your freedom of speech, which should have no trial period at all. (Image Source: My[confined]Space)

we hope you have enjoyed 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Access Denied. We certainly don’t want our websites to face this destiny. (Image Source: hogosha-1)

access denied 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Censorship is no fun. SOPA could be harmful for web business too, imagine what those who hate you and your business will do. (Image Source: BananahMan)

censorship is no fun 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Website Has Been Blocked. “If you have questions or concerns, please do not hesitate to jump off a bridge.” (Image Source: Get Your Censor On)

website has been blocked 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Feel The Burn. Though it’s funny, it could become the truth if SOPA is passed! Feel the burn! (Image Source: Get Your Censor On)

feel the burn 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Google 2012. This is what you get from Google search result if you allow the SOPA to be passed. What could be worse than this? (Image Source: meh.ro)

google 2012 28 Anti SOPA/PIPA Artworks and Memes [Pics]

STOP SOPA Bill. A great number of artists have risen up to fight against the SOPA in the artwork form or text form, as the SOPA could mean the end of the creative industry. (Image Source: sakimichan)

stop sopa bill 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Konachan Says Stop SOPA. Stop SOPA! That’s what every artist should think and do. (Image Source: Marcvilzal123)

konachan says stop sopa 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Freedom of Speech. SOPA is not the answer for piracy and freedom of speech. (Image Source: 4th-reset)

freedom of speech 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Life After SOPA. YouTube, deviantArt, 9GAG, all the user-submitted content sites will be in risk if the SOPA is allowed to censor the Internet. (Image Source: ToaJacbobofPsychic)

life after sopa 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Stop Before It’s Too Late. With the SOPA, all fan arts will be impossible. (Image Source: Antooncartoon)

stop before its too late 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Corporotopia 01. A dark comic about how industry players will threaten you if SOPA is passed. You could never trust those who tried to take away your freedom of speech. Follow the full comic after the link jump. (Image Source: alexiuss)

corporotopia 01 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Unprotected IP. How we gonna talk freely if SOPA exists? A simple message could get you sued if big players are willing to, and the comic below shows you the situation, full comic after link jump. (Image Source: 8Biticon)

unprotected ip 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Stop SOPA Cartoon. All of us will be in jail if the Internet gets censored. No freedom for your speech and works. (Image Source: Tobibrocki)

stop sopa cartoon 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Freedom Reddit. Brave Reddit has been involving greatly in the Anti-SOPA movement, and this is what every famous site should do. (Image Source: Reddit)

freedom reddit 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Destructoid Censored. A picture of Destructoid showing that it stands against the SOPA, amusing and bravo! (Image Source: Destructoid)

destructoid censored 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Fight Fo’ Your Rights. The best way to stop SOPA and PIPA is to join the fight! And this comic will show you how. Full comic after link jump. (Image Source: Loonafictation)

fight fo your rights 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Thunder and the Pack go to Washington. “I decided to show some support for the opposition by creating this little comic in which my hunter, Tunderbrew, takes the pack to Congress to testify against S.O.P.A. Long live Internet Freedom!” (Image Source: wc3troll)

thunder and pack to washington 28 Anti SOPA/PIPA Artworks and Memes [Pics]

This is SOPA! Except the fact that the Entertainment Industry won’t be as great as the Leonidas, especially with their attempt to block the DNS just because of the possible copyright infringement that might not exist at all. (Image Source: quickmeme)

this is sopa 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Shouldn’t Censor. I thought US is the nation of freedom, I could be wrong. (Image Source: quickmeme)

shouldnt censor 28 Anti SOPA/PIPA Artworks and Memes [Pics]

The Worst That Can Happen. A short yet amusing comic that talks about the worst thing that can happen if SOPA is passed… get ready to know. (Image Source: Imgur)

the worst that can happen 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Censorshit. With all due respect, no one likes censorshit. (Image Source: Ars Technica)

censorshit 28 Anti SOPA/PIPA Artworks and Memes [Pics]

Reflection

From the fight against the SOPA and PIPA, we really witnessed the unity and courage of the American people to fight for their freedom of speech, and the great spirit of the people worldwide who helped to raise the concern. Hat tip to all the creators of artworks and those who are still fighting to preserve the freedom of speech, all of you are heroes.

The fight has to go on as like what we’ve mentioned before, the SOPA is not down yet, and the PIPA will be voted on 24th January. So if you’re an American, join the fight for your rights immediately, else you can contribute by sharing this post or these images to every people or everywhere you know. Internet Freedom relies on you to win it back!