zwwcn

Just another WordPress.com site

Position An awesomefont background Relative to its Container Using CSS

<div id="container">
   <div id="box"> </div>
</div>
#container {
  position: relative;
}

#box:after {
  content: "\f154"; 
  font-family: FontAwesome;
  font-size: 100px;
  position: absolute;
  top: 40px;
  left:20px;
  z-index: 1;
}

ref : http://stackoverflow.com/questions/104953/position-an-html-element-relative-to-its-container-using-css

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s