Stylish CSS Snippets for Squidoo
Ranked #1,857 in Squidoo Community, #181,254 overall
Smange's favourite CSS snippets for Squidoo
I've also snuck a few modules in, because when I first started using Squidoo I thought they were nifty uses of CSS that everybody around here seemed to like. On some levels this is true, but the reality is that they're easy and readily available for anyone. There's only a few of them, and I've sprinkled them throughout the CSS snippets.
So, here's my collection of favourite CSS snippets used for breaking up text, highlighting, quoting etc. I'm going to presume a little background knowledge in using CSS and just get on with sharing the code. Enjoy!
(Squid Teacher by Steve Thompson is licensed under Creative Commons - Available at Squid Art Too)
Skip ahead!
If you know what you want
Keeping it simple
A word of advice
Basic Text Styling
Simple text tricks
<strong> <b> <em>
<i> <a> <p>
<br> <img> <ul>
<ol> <li>
Mostly, I'll be showing CSS snippets using the p (paragraph) tag, but remember you can use these other tags too. Especially good to remember with images! If you want more advice and useful links on HTML, there's a little more info on my "Top Tips For New Squidoo Lenses" lens.
Using Code From This Lens
I'm putting this code out here for people to use in their lenses. I'm making it extra easy for you to use, too. Whenever you see a code snippet, triple-click on the paragraph then copy and paste into your work. Don't forget to change the words later!
Headings on Squidoo
- <H1> for Squidoo lenses is the title of the lens, eg. "Stylish CSS Snippets for Squidoo" for this lens.
- <H2> for Squidoo lenses is the title of the module, eg. "Basic Text Styling" for this module.
- <H3> for Squidoo lenses is the subtitle of the module, eg. "Simple text tricks" for this module.
- But, H4 isn't an allowed tag in Squidoo!
In order to keep my styling consistent, I decided to use the same tags whenever I wanted to use a H4 tag. I chose the strong and em tag together.
<strong><em>Here's a makeshift H4 title</em></strong>
Acknowledgements
Thanks to these geeks for their CSS guides

- Squidoo CSS - my favorite code to spice up a lens by SquidooHelp (I think I originally got the idea for curved corners and the StickyNotes hack from here).
- CSS Tricks by thefluffanutta (Some of my favourite ideas come from here, like a CSS border as a divider and hacking the intro title. And although I didn't get the ideas from this, there's great tips on how to use Squidoo classes and float paragraphs. Also check this lens out for how to float paragraphs to make a column effect and other pretty CSS hacks)
- Advanced CSS: Layout Tricks and Lab Experiments by GreekGeek (has great CSS info and has more details on curved corners and how to use them to make widgets!)
Grey Boxes
HTML snippets - Grey is subtle and stylish
Here's a simple grey box.
<p style="border: 2px solid #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey box code</p>
Here's a simple grey double-bordered box.
<p style="border: 6px double #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey double-bordered box code</p>
Here's a simple grey dashed-bordered box.
<p style="border: 3px dashed #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey dashed-bordered box code</p>
Here's a simple grey box with curved corners.
Note: Not all browsers will render these corners the same way.
<p style="border: 2px solid #999999; background-color: #F7F7F7; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px;">Here's your simple grey box with curved corners code</p>
Here's a simple grey double-bordered box with curved corners.
<p style="border: 6px double #999999; background-color: #F7F7F7; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px;">Here's your simple grey double-bordered box with curved corners code</p>
The Most Important Thing
Floating Grey Boxes
Code Snippets - For people who aren't simple
float:right; width: 300px;
Here's a simple grey box.
<p style="float:right; width: 300px; border: 2px solid #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey box code</p>
Here's a simple grey double-bordered box.
<p style="float:left; width: 300px; border: 6px double #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey double-bordered box code</p>
Here's a simple grey dashed-bordered box.
<p style="float:right; width: 300px; border: 3px dashed #999999; background-color: #F7F7F7; margin: 10px; padding: 10px;">Here's your simple grey dashed-bordered box code</p>
Here's a simple grey box with curved corners.
Note: Not all browsers will render these corners the same way.
<p style="float:left; width: 300px; border: 2px solid #999999; background-color: #F7F7F7; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px;">Here's your simple grey box with curved corners code</p>
Here's a simple grey double-bordered box with curved corners.
<p style="float:right; width: 300px; border: 6px double #999999; background-color: #F7F7F7; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px;">Here's your simple grey double-bordered box with curved corners code</p>
Styling Text Inside Boxes
They need a little zing!
Here's a simple grey box with larger, bolded text and taller line-height.
<p style="border: 2px solid #999999; background-color: #F7F7F7; margin: 10px; padding: 10px; font-size: 150%; line-height: 1.5em; font-weight: bold;">Here's your code for the simple grey box with larger, bolded text and taller line-height</p>
<p style="font-size: 150%; line-height: 1.5em; font-weight: bold;">Here's your code just for the larger, bolded text and taller line-height</p>
Here's a simple grey box with larger, centred text and taller line-height.
<p style="border: 2px solid #999999; background-color: #F7F7F7; margin: 10px; padding: 10px; font-size: 150%; line-height: 1.5em; text-align:center;">Here's your code for the simple grey box with larger, centred text and taller line-height</p>
<p style="font-size: 150%; line-height: 1.5em; text-align:center;">Here's your code just for the larger, centred text and taller line-height</p>
StickyNote
These sticky-notes are actually a module called "Stickynote". No CSS required!
Know of more CSS tips?
Share your favourites
If you've written a lens on CSS tips and tricks, please add it here! Also, if you want to share your favourite CSS tips websites feel free to do that too.
Squidoo CSS - my favorite code to spice up a lens
I've gathered my favorite Squidoo-code for later r more...0 points
My Favourite CSS Tricks on Squidoo
The basic tools provided by Squidoo will do pretty more...0 points
Advanced CSS: Layout Tricks and Lab Experiments
Columns! Images! Colored boxes! This lens is my CS more...0 points
Colour Combinations for Boxes
Getting a little variety
<p style="float:left; width: 200px; border: 6px double #4682B4; background-color: #B0C4DE; margin: 10px; padding: 10px;">This is border:#4682B4; background: #B0C4DE;</p>
<p style="float:left; width: 200px; border: 6px double #7109AA; background-color: #FFFF00; margin: 10px; padding: 10px;">This is border:#7109AA; background: #FFFF00;</p>
<p style="float:left; width: 200px; border: 6px double #D0006E; background-color: #98ED00; margin: 10px; padding: 10px;">This is border:#D0006E; background: #98ED00;</p>
<p style="float:left; width: 200px; border: 6px double #212D43; background-color: #00A287; margin: 10px; padding: 10px;">This is border:#212D43; background: #00A287;</p>
<p style="float:left; width: 200px; border: 6px double #183090; background-color: #F0C0A8; margin: 10px; padding: 10px;">This is border:#183090; background: #F0C0A8;</p>
<p style="float:left; width: 200px; border: 6px double #3060C0; background-color: #F0F000; margin: 10px; padding: 10px;">This is border:#3060C0; background: #F0F000;</p>
<p style="float:left; width: 200px; border: 6px double #FF7C00; background-color: #37B6CE; margin: 10px; padding: 10px;">This is border:#FF7C00; background: #37B6CE;</p>
<p style="float:left; width: 200px; border: 6px double #339A99; background-color: #FFFFC0; margin: 10px; padding: 10px;">This is border:#339A99; background: #FFFFC0;</p>
<p style="float:left; width: 200px; border: 6px double #C93F45; background-color: #FFE932; margin: 10px; padding: 10px;">This is border:#C93F45; background: #FFE932;</p>
<p style="float:left; width: 200px; border: 6px double #003090; background-color: #F0F090; margin: 10px; padding: 10px;">This is border:#003090; background: #F0F090;</p>
<p style="float:left; width: 200px; border: 6px double #6D6F40; background-color: #A4E89F; margin: 10px; padding: 10px;">This is border:#6D6F40; background: #A4E89F;</p>
<p style="float:left; width: 200px; border: 6px double #D67D1F; background-color: #FFC559; margin: 10px; padding: 10px;">This is border:#D67D1F; background: #FFC559;</p>
<p style="float:left; width: 200px; border: 6px double #30380A; background-color: #AFFF00; margin: 10px; padding: 10px;">This is border:#30380A; background: #AFFF00;</p>
<p style="float:left; width: 200px; border: 6px double #58C0B2; background-color: #EFF49A; margin: 10px; padding: 10px;">This is border:#58C0B2; background: #EFF49A;</p>
<p style="float:left; width: 200px; border: 6px double #2FA3CA; background-color: #FFC559; margin: 10px; padding: 10px;">This is border:#2FA3CA; background: #FFC559;</p>
<p style="float:left; width: 200px; border: 6px double #5E4A27; background-color: #B9862D; margin: 10px; padding: 10px;">This is border:#5E4A27; background: #B9862D;</p>
<p style="float:left; width: 200px; border: 6px double #303030; background-color: #00D890; margin: 10px; padding: 10px;">This is border:#303030; background: #00D890;</p>
<p style="float:left; width: 200px; border: 6px double #183090; background-color: #F0C0A8; margin: 10px; padding: 10px;">This is border:#183090; background: #F0C0A8;</p>
<p style="float:left; width: 200px; border: 6px double #B9862D; background-color: #FFE932; margin: 10px; padding: 10px;">This is border:#B9862D; background: #FFE932;</p>
<p style="float:left; width: 200px; border: 6px double #5C4B53; background-color: #8E9689; margin: 10px; padding: 10px;">This is border:#5C4B53; background: #8E9689;</p>
<p style="float:left; width: 200px; border: 6px double #C0A8C0; background-color: #FFFFF7; margin: 10px; padding: 10px;">This is border:#C0A8C0; background: #FFFFF7;</p>
<p style="float:left; width: 200px; border: 6px double #67AFAC; background-color: #FFFFF7; margin: 10px; padding: 10px;">This is border:#67AFAC; background: #FFFFF7;</p>
<p style="float:left; width: 200px; border: 6px double #181848; background-color: #60B3B3; margin: 10px; padding: 10px;">This is border:#181848; background: #60B3B3;</p>
<p style="float:left; width: 200px; border: 6px double #184818; background-color: #609048; margin: 10px; padding: 10px;">This is border:#184818; background: #609048;</p>
I know some of them look a little weird, but I was just experimenting and some of them are great.
If you want to generate some new ideas for colour schemes of your own, try here:
Using CSS in the Intro Module
The intro module is a bit different
However, it can be useful to use CSS in the intro module. Scroll through the pages I've favourited and see for yourself why it's worthwhile.
Obviously, you need to work with how the text looks on your lens, too. Choose something subtle and classy if you choose to use CSS in your intro module.
Note: thefluffanutta has detailed a great hack for making the introduction module border sit nicely.
Mixing it up
Find code and mix it up!
Mix up the options I've given you on this page!
My Favourite Code
Using combinations of box style, colour and text style
<p style="float:left; width: 200px; border: 6px double #7109AA; background-color: #FFFF00; margin: 10px; padding: 10px; font-size: 150%; line-height: 1.5em; text-align:center; font-weight:bold;"> This yellow is eye-catching</p>
<p style="float:left; width: 200px; border: 6px double #4682B4; background-color: #B0C4DE; -moz-border-radius: 10px; -webkit-border-radius: margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center;">With a double curved border, I like to leave off bolding</p>
<p style="float:left; width: 200px; border: 6px double #339A99; background-color: #FFFFC0; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px; text-align:center;">Very old-fashioned</p>
<p style="border: 3px dashed #999999; background-color: #F7F7F7; margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center;">I like the dashed bordered box only as a simple full-width box</p>
<p style="float:left; width: 200px; border: 8px double #B9862D; background-color: #FFE932; margin: 10px; padding: 10px; font-size: 110%;">You could use this to write a short paragraph</p>
<p style="float:left; width: 200px; border: 6px double #67AFAC; background-color: #FFFFF7; -moz-border-radius: 10px; -webkit-border-radius: margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center;">Sweet colours with double curved borders are nice</p>
<p style="border: 3px solid #58C0B2; background-color: #EFF49A; margin: 10px; padding: 10px; font-size: 120%; line-height: 1.2em; text-align:center;">These are great as floats or full width.</p>
<p style="float:left; width: 200px; border: 2px solid #999999; background-color: #F7F7F7; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px; font-size: 130%; line-height: 1.3em; text-align:center; font-weight:bold; ">Single, gray curved line and larger bold text</p>
<p style="float:left; width: 200px; border: 5px solid #C93F45; background-color: #FFE932; margin: 10px; padding: 10px; font-size: 130%; line-height: 1.3em; text-align:center; font-weight:bold; ">Bold and Beautiful</p>
<p style="float:left; width: 200px; border: 6px double #003090; background-color: #F0F090; -moz-border-radius: 10px; -webkit-border-radius: 10px; margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center; ">This is border:#003090; background: #F0F090;</p>
Here's one I love from thefluffanutta which I found here:
<p style="border-bottom: 3px double silver;"></p>
Note: Don't put any text in the paragraph if you want to get that effect (although, it would look kind of cool with text in it too).
<p style="float:left; width: 200px; border: 6px double #6D6F40; background-color: #A4E89F; margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center; ">It's not easy being green</p>
<p style="float:left; width: 200px; border: 2px solid #D67D1F; background-color: #FFC559; -moz-border-radius: 10px; -webkit-border-radius: margin: 10px; margin: 10px; padding: 10px; font-size: 120%; line-height: 1.2em; text-align:center; font-weight:bold;">Short and Snappy</p>
<p style="border-left: 3px solid #999999; margin: 2.5em; padding: 10px; font-family: Verdana; font-size: 16px; ">Here's a great Quote Indent</p>
<p style="float:left; width: 200px; border: 2px solid #30380A; background-color: #AFFF00; -moz-border-radius: 10px; -webkit-border-radius: margin: 10px; margin: 10px; padding: 10px; font-size: 120%; line-height: 1.2em; text-align:center; font-weight:bold">So Bright!</p>
<p style="float:left; width: 200px; border: 6px double #C0A8C0; background-color: #FFFFF7; -moz-border-radius: 10px; -webkit-border-radius: margin: 10px; margin: 10px; padding: 10px; font-size: 110%; line-height: 1.1em; text-align:center;">It's just like icecream!</p>
Blackbox
This pretty box is actually a handy module called "Black Box". Not just in black either, it comes in black, blue, light blue, green, grey, orange and red. Not a drop of CSS in sight!
Adapting modules with CSS
A small hack with class (but unfortunately an awful sense of humour)
Here's something that looks like the "StickyNote" module, but is actually CSS
Instead of adding your own styling, just tell the paragraph to use class="postit-inner" and it will look just like the StickyNote module. Then you can do other cool CSS things, like floating left/right around your text. Remember to add a margin so your text doesn't slam up against the side of your floated paragraph.<p class="postit-inner" style="float: left; margin: 5px; ">Here's your StickyNote Hack code</p>
"Most Important Thing" Hack
This module hack can also be done with the "Most Important Thing" module
You can adapt the "Most Important Thing" module to float left/right have an alternate width, border colour, background etc. And yes, you could just style the entire box yourself from scratch, too. But, you like the padding and border width from the "Most Important Thing" don't you?<p class="important-thing" style="float: right; margin: 5px; width: 300px; border-color: purple;">Here's your "Most Important Thing" Hack code</p>
BlackBox Hack Fail
BlackBox is different, in that the design is made using two divs with different information contained in each. It also uses the id attribute, which gets stripped out of your Squidoo code. So, I'm afraid you'll just have to use CSS to design something similar or stick to using the module.
A word of note
Something else to remember about using the modules over these CSS hacks is that you can have a "hidden" title to the module. Or rather, that when you use the module, the title is contained inside the StickyNote or "Most Important Thing". This has many benefits.
Using CSS to hack your profile
Because it's fun!
Here's the trick: Just keep using pictures (and paragraphs containing pictures) until you want the sidebar to stop displaying, then get on with the text. There's no fancy hacks - you can even use line breaks within paragraphs (but not between paragraphs). Plus, you can even get away with a handful of lines of text before you need to start using pictures.
Keeping the profile page neat
Here's the next important thing to note: If you add a long stream of pictures into your default bio it will look pretty ugly on your bio page. So, to get around this, there's a few hacks worth remembering.
- Centre your pictures so they don't look so bad (on both your profile and your lens sidebar).
- Use paragraph floats to make the pictures sit alongside each other on the bio page, yet in a neat vertical line on the lens sidebar. Note: float:left looks better in the sidebar than float:right, so stack up columns using float:left.
Here's how part of my bio looks (as I write this):

It's a float:left paragraph (with plenty of padding) containing smaller, centred images, followed directly (no line break) by a larger picture. The padding in the paragraph on the left is used to push the larger picture on the right further over. I've also got links around all the pictures, but I'll strip that out and show you the basic code for the layout.
<p style="float:left; padding: 35px; text-align: center;" ><br ><img src="http://yourpicturehost.com/Twitter.jpg" > <br>
<img src="http://ysquidutils.com.com/yourname.jpg" border="0" > <br>< img src="http://yourpicturehost.com/whatever.jpg" ></p><img style="padding: 15px;" src="http://yourpicturehost.com/TheLargePicture.jpg" >
Note: The first <br > is there (inside the paragraph) because when it was in the lens sidebar it was sitting too close to the picture before it. This was just one way of fixing this issue.
More Squidoo CSS Guides & Snippets
Learn from all of us!
Read CSS tips from outside Squidoo
More Squidoo Tips
Squidoo Tips by Smange
Say hi!
Thanks for stopping by. If you've got any comments, tips or tricks you'd like to add then feel free!
-
-
Mia-Mia
Sep 2, 2011 @ 2:44 am | delete
- Thank you for a great lens. I'm going to bookmark this one for future reference.
-
-
-
autowebsite
May 25, 2011 @ 3:51 pm | delete
- "Here's a simple grey box with curved corners.
Note: Not all browsers will render these corners the same way" - cool!
-
-
-
EditorDave Jan 14, 2011 @ 1:10 am | delete
- Thank you for this amazingly enlightening lens. I've always admired the "decked-out" lenses and wondered how they did it. I'm bookmarking your lens for later reference. And I've liked, favorited, thumbs-upped, and lensrolled your masterpiece. Congrats on a great job!
-
-
-
the777group
Nov 3, 2010 @ 8:47 pm | delete
- Squidoo CSS made easy. Thanks.
-
-
-
ShirlW
Oct 20, 2010 @ 9:20 am | delete
- Well done and so easy to understand, which is so important to the technically challenged (that would be me).
Blessed today by a Squid Angel and featured on Pay It Forward - My Life As An Angel
-
- Load More
Tell me what you think!
Ratings are much appreciated!
This module only appears with actual data when viewed on a live lens. The favorite and lensroll options will appear on a live lens if the viewer is a member of Squidoo and logged in.
by smange
I'm an eclectic sort of person who writes on... more »
- 35 featured lenses
- Winner of 6 trophies!
- Top lens » Learn French Easily!
Explore related pages
- Squidoo CSS - my favorite code to spice up a lens Squidoo CSS - my favorite code to spice up a lens
- My Favourite CSS Tricks on Squidoo My Favourite CSS Tricks on Squidoo
- Advanced CSS: Tricks and Tips Advanced CSS: Tricks and Tips
- Tables for Squidoo Lenses Tables for Squidoo Lenses
- Colour Codes for CSS and HTML Colour Codes for CSS and HTML
- Squidoo CSS: multi-column text Squidoo CSS: multi-column text



