Strictly for beginners only, if you are a CSS guru you probably know how to make a better css content box.
Vivamus viverra, ante vitae hendrerit convallis, ligula nulla laoreet diam, eu rutrum massa erat nec nunc. Donec ac mi. Vestibulum magna arcu, iaculis eu, venenatis id, facilisis convallis, quam. Phasellus sagittis adipiscing est. Nunc pretium sagittis felis. Vivamus euismod lectus vel risus. Cras a libero vitae mi commodo facilisis. Praesent nibh. Ut vehicula fermentum lectus. Nunc et odio cursus sapien adipiscing pharetra. Fusce ante. Nulla facilisi. Mauris tempor. Aliquam fringilla libero rhoncus mi. Nullam congue.
This tutorial will be pretty straight forward, there isn’t any real css tricks or hacks involved. But I really like the simplicity of this css content box and I thought I’d share this with all the aspiring designers out there. What you see above is actually a div with an image of a folded corner otherwise known as dogear for obvious reasons.
Here’s what the dogear image looks like by itself, as you can probably tell this image will be sitting on the upper right corner of our content box. Let’s do some basic coding, here is the css code for our content box.
div.contentbox{
background: #F7F7F7 url('images/dogear.jpg') no-repeat;
background-position:100% 0%;
border:1px dotted #ccc;
padding:30px}
That’s basically it, we have a CSS class for our content box. I told you this was straight-forward! And now let’s take a look at the html code:
<div class="contentbox">
Blah blah blah the contents will be placed here...blah blah blah..
</div>
Pretty simple right??? Of course you can place the dogear on any of the corners by playing around with the CSS class for that image.
*NOTE ~ This was tested on Firefox 3, IE6, IE8, and Opera not sure how it would look on Safari.
No related posts.
Hi, it´s a good article for beginners as you said.
But I like the approach and simplicity!
Reply To This Comment
Nice simple example which is great for learning. You can also remove the second line of code and replace the first line at the end with top right.
Reply To This Comment
great i will try to do it on my site
Reply To This Comment
I want to change the background image . i do not want to repeat the background image.
Reply To This Comment
Thanks a ton for this post, this content box looks very cool.its awesome. wonderful work.
Reply To This Comment
Very cool css styles on your site – great customization
Reply To This Comment
Looks good in Safari too.
Reply To This Comment
Good work. Can I get good use.
Reply To This Comment
Would it be possible to also apply this to images, as well?
Reply To This Comment
Thanks for this nice customization. I am sure everyone would find this one useful !
Reply To This Comment
good job, I like it!
Reply To This Comment
Pages
Featured Template
Recent Comments
Connect With Me
Twitter
StumbleUpon
Facebook
FriendFeed
LinkedIn
RSS Feed
Check out my about.me profile!
Latest Testimonial
"As the project began, Jon led me through process, and the final product is better than I could have imagined!" [ ...read more... ]
© 2012 » JBWEBDEV « Houston Web Design & Development
My Favorite Links
Recent Project
www.modernsalondayspa.com
Ways to Contact Me
Follow me on Twitter - jonxblaze
Call me directly - 832.413.2642
Go to my contact form
Drop a comment on my blog
GTalk me at jonxblaze[at]gmail