Posts Tagged ‘css’

Facebook Connect: Display login button only when not connected to site

Currently i’m testing the features of Facebook Connect and i ran into troubles:

  • how to display the login button only if a user has not connected
  • how to display the image only if a user has connected

My simplest solution was to add some custom css classes:

  • fb-connecting: when the status of facebook connect is not known. e.g. display a “connecting…” message
  • fb-not-connected: when user is not connected to facebook. e.g. show connect button
  • fb-connected: when user is connected to facebook. e.g. show user picture and name

View the demo page

Read the rest of this entry »

Tags: , ,

CSS Counter Test / Auto numbering your google docs headlines with CSS

In the firstplace I did the numbering of the google-docs headlines with css. But the numbering in the google-docs always got messed up after some time, which was caused by:
a) The behaviour of google-docs: It sometimes wraps the headlines in an extra div (which i consider as a bug)
b) Browser limitations of css numbering, if the numbered elements are not all on the same dom level (because of the extra google-docs div)
Read the rest of this entry »

Tags: ,