Squidoo CSS - my favorite code to spice up a lens

Ranked #434 in Squidoo Community, #55,030 overall | Donates to Inner-City Scholarship Fund

Squidoo coding - css examples

I've gathered my favorite Squidoo-code for later reference. I'm tired of trying to find that specific lens I used a css effect on and then having to go to edit-mode, copy paste, and then go back to the lens I was working on. This lens will help me be a better lensmaster and perhaps it will help some other squids as well.

I've adapted the colors on this lens to fit the default theme of squidoo lenses (as of April 2011). But an easier way to make sure your colors fit your theme, is to pick the black-white-gray 'Zen' or the New York theme. So instead of going in and changing all your CSS, just go and change your theme. However, if you're looking at this lens to spice up a new lens, do keep it simple.

Some basic HTML explanations

Most of the code I use here is based on the paragraph HTML-code.

<p> Your text here </p>

Notice that it starts with <p>
and ends with </p>

The first is the opening tag. The second is the closing tag. The text you want to format goes between those two tags.

Paragraph tags are great because after the closing paragraph tag your next text will automatically go on the next line. In squidoo you can also just push <enter> - but that won't work in ordinary HTML

The other basic HTML tag I use is bold:

<b>your text here</b>

Opening tag: <b>
Closing tag: </b>

This can be in a paragraph - and works if you want to style a single word.

So the basic message here is: if you want your text styled, use both the opening and the closing HTML-tags.

Orange Box

This is a style I like to use when I want some of the look of 'the most important thing' module, but not all.



Opening tag:
<p style="border: solid 10px #ff6600; padding: 10px">

Closing tag: </p>

Because this is the first example, I'll also give the full code of the orange box above (code highlighted in bold):

<p style="border: solid 10px #ff6600; padding: 10px">This is a style I like to use when I want some of the look of 'the most important thing' module, but not all. </p>

Light blue background

The style of the new 'contents at a glance' bit

This is a slightly lighter color of light blue than is used in the new background to the default theme. I think it fits that theme very well.



Opening tag:
<p style="background: #E1E8F2; padding: 15px; margin: 0;">


Closing tag: </p>
Important!

A note for CSS newby's

If you don't get this lens, don't worry: just try:
  1. Copy, paste the code of your choice into a module of your choice

  2. Save that module: you will now see an approximation of what that module will look like in the end result

  3. Publish

  4. View The page

The worst that can happen is that that module looks awful or nothing happened. Just delete the code and try again.

I learned by trial and error, so can you!

(Light) Yellow background

This is the background-color was once used in the 'created by' bit that's at the top of each lens. It could be used to highlight text in a way that's not too flashy. (Orange is flashy, light yellow is more mellow - yes that rimed).


Opening tag:
<p style="background: #FCF8C0; padding:15px; margin: 0;">


Closing tag: </p>

Really make something stand out: yellow and orange

A variation on the previous example, inspired by stuff I've seen on other lenses recently. I created it for a lens where I had some advice that I wanted to stand out.



Opening tags:<p style="border: dotted 2px #ff6600; background: #FCF8C0;
padding: 10px">


Closing tags: </p>

Floating text to the right, and giving it color & post-it note

text that floats to the right, has a blue background that combines well with most templates and a larger font-size etc.
This is just text that goes on... and on, and on, etc... Normal text. Can be a list, can even be the content in your rss or contents module.

This trick can be done in most modules. Just start with the text you want to highlight and enclose it in the following code:

Opening tag:
<b style="background: #76a0cC; width: 200px; float: right; padding: 15px; margin: 15px; font-size: 150%; line-height: 1.5em;">


Closing tag: </b>

post it
Making your own floating post it-note. Using the style of squidoo, but with a twist.

I love the post it note module, but have often wished the post it note to be INSIDE a text/write module. Now you can do that, like I did here.

Here's the code:

<p class="postit-inner" style="float: right; "> your text </p>

Don't use too much text - the style will break and you will end up with text against a white background.

Floating pictures to the right

Pictures give your lenses just that little bit of extra. I'll leave it to you to find those pictures, or take them.

What I will show you is how to float your images to the right and give them some space.

This will work in all kinds of modules. I particularly like the effect in the guestbook module, but it will also work in for instance the table of contents module.

So here's the code:
<img style="float: right; padding: 10px;"
src="http://www.yourwebsiteorsomething.com/picture.JPG" />


And, upon request, how to put a border around a picture. Experiment with the border width (10px in this case), the padding and the margin. To get the effect here see:

<img style="float: right; padding: 10px; margin: 10px; border: 10px solid #154679;"src="http://www.something.com/picture.JPG" />

Keep track of your favorite code

Squidoo code can be kept in any text document. You can just use MS word for instance.

I try to keep all the code on the same subject (an affiliate program, or logincodes, or codes used on squidoo) in one file.

It saves time and energy to just keep those codes in one place. This makes for quick and easy mass editing and you don't have to look things up.

Blue Typed Text


I use this for quotes sometimes. It gives a nice contrast and the colors go well with the squidoo colorscheme


Opening tag:
<p style="color: #154679; font: 150%/1em 'courier new'; padding:
10px;">


Closing tag: </p>

Similarly - combined with a bold font, the effect can be a bit more striking.



Opening tag:
<p style="color: #154679; font: 150%/1em 'courier new'; padding:
10px;">
<b>


Don't forget to close both the bold and the paragraph tags like this: </b></p>

More blue text, but without the special font

This text is bold, blue, larger than usual and has space between the lines that you probably won't notice but still makes it more legible.


Opening tag:
<p style="color: #223E5B; line-height: 1.2em; font-size: 150%; font-weight: bold; padding: 10px; margin: 10px;">


Closing tag: </p>

More blue letters, font size a bit larger than usual

For a calmer effect this color, with a font-size just a few pixels larger than the usual squidoo font-size can work very well. It's the precise color of the default titles.


Opening tag:
<p style="color: #1A67B8; font-size: 150%; ">


Closing tag: </p>

Blue text, dotted line under paragraph - a more fancy way to do quotes

This is definitely a fancier way to do quotes, I think you'll agree. I've used this on two squidwho lenses so far and feel it fits that rather subdued design well.



Opening tag: <p style="color: #1A67B8; line-height: 1.5em; font-size: 150%; padding: 0 15px; margin: 5px; border-bottom: 1px dashed;">

Closing tag: </p>

More squidoo blue

this is the precise color the headings and links have in squidoo


Opening tag:
<p style="color: #1A67B8;">


Closing tag: </p>

Very beautiful subtitles that fit the style of squidoo

look at this



Opening Code:

<p
style="width:100%;color:white;background: #1A67B8;padding-top:3px;padding-left:5px;font-family:Georgia, 'Times New Roman',Times,serif;font-size:30px;font-weight:bold;line-height:1em;padding-bottom:5px;"><b>


Closing code: </b></p>

Orange text

I've used these orange letters on a jokes page. The orange is related to the several orange colors in use on squidoo. the font-size is just a bit larger than the standard-squidoo lettering and the style is bold



Opening tag:
<p style="color: #f60; font-size: 150%; font-weight: bold">


Closing tag: </p>

Red text, within a paragraph.

So far I've shown how to give a whole paragraph a new look, because that's what I usually do. But sometimes it's just fun to turn some text red right in the middle of a paragraph.
Opening tag:
<b style="color: red">


Close this off with: </b>

Common problem

The one thing I find when I can't make the code work is that I need to delete line-breaks.

Make sure there are still spaces between the different parts of the code, but make sure there isn't a hidden in there somewhere.

Indenting text - the alternative for using blockquote


In ordinary HTML a blockquote is used to indent text. Officially this should only be used for quotes, but that's a detail. I've given a lot of suggestions on how to format quotes on this lens, but what follows is the bareback version. An answer to the question:



how do I indent text on squidoo?

Here's the code:

Opening tag: <p style="margin-left: 20px">

Closing tag: </p>

Rounded corners

NOT recommended

While these are on a lot of lenses, I think this style is over the top. Use with caution.

rounded corners...



Do you like them?



I like the double border - and a dark background and white letters while I'm at it.



So here's the code. Openingtag:

<p style="border:double 5px #000033; -moz-border-radius: 15px;
-khtml-border-radius: 15px; -webkit-border-radius: 15px; border-radius:
15px; background: #1A67B8; color: #fff; padding: 5px;">


closing tag: </p>

BTW - this code doesn't work in the introduction module, unfortunately.

Heads up on HTML and CSS options on squidoo

For all you HTML or CSS-coding geeks on squidoo...



Squidoo disables the following:
  • <strike>: which would normally make text have a horizontal line through it.

  • <hr> :horizontal lines

  • i-frames


What you CAN use
  • font-size in pixels (px) - or can you? It doesn't seem to work for me, but a few days ago it did. A good designer doesn't use pixels anyhow, so I'd advise using % to size text - as I show in the examples.

Strike through

If you have to correct something in a coding lens - where the previous text needs to stay in place, you can use this.

<b style="text-decoration: line-through; font-weight: normal">

closing tag:
</b>

More on using CSS on squidoo

I've made a special lens to explain just how to combine the code on this page. Learn how to combine the borders with the fonts etc.

And another to teach you how to use the theme-colors, fonts and font-sizes.
Loading

Any questions?

http://www.squidu.com/forum/Unfortunately changes in my personal life, and in the way squidu is managed, have made me decide to stop answering questions on that forum. I'm also too busy to answer questions elsewhere.

I am available for consulting though, but that doesn't come cheap. For $99 you get a month of asking whatever questions you want and advice on your SEO strategy, link building, optimizing your blog etc. SEO consult online publishing.

If you aren't willing to pay up, you'll have to be content to stay updated on my Marketing Spiritual Blog where I am also willing to answer any questions related to the posts. It also contains a free ebook.

I'm active on twitter and facebook.
Important!

Thanks for all your support!

A big thank you to all of you who've supported my online work by:

by

squidoohelp

I've made a lot of lenses and a marketing blog to help you become a success on squidoo. I've even made my own Katinka's Squidoo Answer Deck - which is... more »

Feeling creative? Create a Lens!