How to fix your HTML borders and backgrounds in Squidoo

Ranked #4,118 in Squidoo Community, #303,889 overall

An Easy Tutorial to Fix Squidoo Borders

Spicing up a lens with a little bit of HTML or CSS can really make the difference for your lensrank and your readers. You may have gone to one of the many wonderful HTML tutorials an found a spiffy border and background for your text. Maybe you copied it, pasted it, and customized the colors.

But now that you look at your lens, the picture from the Squidoo module just kinda overlaps your background. It looks okay, I guess. But sometimes you just don't want it like that! It would look nice if it didn't overlap your background or if the border went around the picture too. But it doesn't! It's just half and half! This lens will explain how to customize your borders and fix this problem even for HTML newbies.
Click here to see an example of a lens that I made using this technique.

If you aren't a newbie, click the shortcut link below to just see the code that fixes it. You can put it into any background or border tag that starts with <p>

This tutorial works best if you have your workshop open in another window or tab, but after you read through this once, you should be able to rinse and repeat for all the lenses you want.

Haven't Found a Border or Background Yet?

Visit these lenses, copy some background or border code you like, and paste into a text module on one of your lenses. Change the colors too if you want. If you have a picture through the Squidoo module, you'll probably have that picture/border overlap effect.

If you just want to get started quickly, copy this into a text module:

<p style="padding: 5px; background-color: #FFFF99; border: dotted 2px #660000; ">Write Five or Six Sentences Here!</p>

Make sure to upload a picture so you can follow the rest of the tutorial.

Special thanks to the authors of these lenses, because they were what I used to help figure this out.

Loading

First, Lose the Wall of Text

Text Walls are Ugly!

If all your text is in a giant block, it's bad for two reasons. First of all, your reader will have to read through the whole thing to find the piece of information he or she wants. Even if it's just one sentence that was really interesting to him. In fact, in a wall of text, your reader has no idea if it's even worth reading at all before reading it. If your text in split up into smaller paragraphs of two or three sentences, your reader can tell at a glance if that particular chunk is worth reading. Amazing, huh? And if you absolutely captivated your reader and they feel like reading your lens straight through (you wonderful writer you), then you can give their eyes and brains a little momentary rest every few sentences. Also, doing this will make your backgrounds and borders much better to look at for the purposes of this tutorial!

How to Break Up Your Paragraphs

Little Bits Look Good!

Breaking up your text wall is easy. For this tutorial, you're going to be breaking up your outlines, too. First, go through your text and hit your enter key after every couple of sentences. Hit it once. That way, there will be a line of beautiful empty space when we're finished with the code. Okay, go ahead. I'll wait right here :)


Great! Now, Take that big chunk of HTML at the top of your module. Mine looks like this:


<p style="padding: 5px; background-color: #FFFF99; border: dotted 2px #660000; ">


Copy it, and paste it at the beginning of each paragraph in your module. (Don't include the </p> in front!) Squidoo automatically ends any styles you started if you forget, but here we want to end it after every paragraph. It won't change and leave that empty space unless you do that! So now just tack </p> at the end of the last word of each paragraph. Paste if you want, but you can type it, too.


Uh oh! Looks like the boxes are smashed together! If you like this look, you can use it, but it happened because the "Enter" that you hit is inside the paragraph tags and not outside them. See how there's some empty space below the top border? To fix it, just hit "Backspace" once at the very top of your paragraph. Then hit "Enter" Once right before the <p starts. See? All better.

For Your Text Modules (Picture Outside)

Image in the Upper Right

Okay, here's the secret you've been waiting for. You only need to do this on the paragraphs that appear next to your picture. The exact number of paragraphs really depends on how big your picture is and how long your paragraphs are. The piece of code you need is:


margin-right: 250px;


Here's how it works. your code is going to have a bunch of stuff. Each separate little piece has a semicolon (;). Click right after that last semi-colon and put that marginy-righty guy in there. Make sure it's still inside the quotation marks (").


Okay! Now hit "Save" and check it out! Not quite right? That's okay. You need to tweak it depending on how big your picture is. Hit "Edit" again and change the "250" to something else. If there's too much space, make it smaller, maybe 225? If the border is still stuck underneath the picture, make it bigger. Try 275 on for size. You might have to switch it around several times, but boy, you won't regret it!

For Your Intro Module (Picture Outside)

Picture on the Left

Do the exact same thing as for the Text Module above! In this case, the code is:


margin-left: 250px;


Only do it on the paragraphs that are next to your picture. Remember, bigger numbers make the border go farther from the picture. Smaller numbers make the border go closer to the picture. Fiddle with it until it looks right to you.

Borders Outside the Pictures

A Little Harder to Pull Off.

Instructions for this coming soon! (There's a way to do this, but it kinda makes the page look lopsided. I'm checking for other ways to do it now) For now I recommend just using photobucket to link photos.

A Work-Around

Not Really Covered Here But...

This Isn't the way I'm going to show in this tutorial, but I thought it deserves mentioning because it gives you more control. You can insert pictures by using the <img src"> tag. The thing is, you need you make sure it gets hosted somehow. There are plenty of free image-hosting sites where you can upload images to link. You never should direct-link an image that comes from another webpage, unless it's an affiliate site such as allposters, and then you need to make sure to leave the links that direct back to the site intact and otherwise follow their requirements.

Synchronize IV

Buy This Allposters.com

This allows you to put your image on the right, left, center, in-between paragraphs, whatever! It definitely breaks the monotony of images in the upper-right corner, module after module. But if you don't really care for all that kerfuffle, then you don't have to do it!

Crib Sheet

Here's the code I discussed in this tutorial. If you aren't sure how to use it, click the big arrow below!

  • 1

    For Intro Modules with the picture outside the border, insert
    margin-left: 250px;
    in your tag. Change "250" until it looks good.
    Only use on paragraphs next to the picture.

  • 2

    For Text Modules where you want the picture outside the border, insert
    margin-right: 250px;
    in your tag. Change "250" until it looks good.
    Only use on paragraphs next to the picture.

  • 3

    To put the picture inside the border, link an image hosted on a free hosting site, instead of using the module upload.

Opinion Poll

Loading poll. Please Wait...

Say Hello!

Say whatever you want!

My Other Lenses

If you liked this, then feel free to visit my lensography and check out my other Squidoo lenses.
Loading

by

AlexandraHubbard

I'm a teacher, dog owner, and multiple hobbyist. I like to share my interests and experiences, and I hope you enjoy my lenses.

Feeling creative? Create a Lens!