Two Beautiful CSS Boxes

1 - I can do better 2 - Jury's out 3 - Pretty darn good 4 - Splendiferous 5 - Awesometastic by 12 people | Log in to rate

Ranked #2,657 in Tech & Geek, #65,122 overall

Short ,Sweet, Coloured, and Square

I was editing my lens:

Yes You - Lose Some Fat Now!

after reading the Spirituality's excellent lens:

Squidoo CSS - my favorite code

and i thought i would play about with a couple of the lines of CSS. The results are two boxes that I used to promote products.

Now I am new to this, and found it really easy to do. Hope that this makes it easy for you too.

How am I going to do this? 

Adding these boxes to your page is easy-peasy. Here's how:

  • Open two browser windows (this makes copying and pasting easier)

  • Leave this page open in one browser window and open the page that you want to edit in another browser window.

  • Highlight the line of code. Start highlighting after the words 'first line of code:' Then right click and copy.

  • Switch to your page that you are editing and paste the line at the point you want the box to appear.

  • Write the text that you want to appear in the box. Write your text after your pasted line of code.

  • After your text either copy and paste from this page the code after the words, 'second line of code:' or simply type </p> after your text that you want to appear in the box.

The Cheeky Little Blue Number 

Blue Box, Blue Border, Boomin Lovely


Bold and brash, yet calm and gentle. I present to you the little blue number.

I have used this to catch the eye and to draw attention to places on my lens that I have links to products.

To see it in action, take a look here - it is midway down the page.

Here is how to get a lovely little blue box of your own:

First line of code:

<p style="background: #E1E8F2; padding: 15px; margin: 0;border: solid 05px #069;">

Second Line of code:

</p>

As simple as that.

The Vibrant Orange Accessory 


Zesty and vibrant, no little blue number would be complete without the Orange Accessory.

I have used this in exactly the same way as the blue box. I like it a lot.

Again, to see it in shaking its stuff, click here It is below the blue box.

Here is how to get a gorgeous orange box that will give you and your readers pleasure time and again:

First line of code:

<p style="border: solid 05px #ff6600; padding: 10px;background: #FCF8C0;">

Second line of code:

</p>

And there you have it.

Altering Your Boxes 

To change the appearance of these boxes, all you need to do is alter the values.



So for example to create a thicker border change the value after border to something higher than '05'. This is '30'.





This is a border done at '05'. It is also 'outset' rather than 'solid'. The background colour is 'ff6600'. Giving us a s multicoloured box that looks like it is coming out of the page.



Anyway my point is you can play about and get all sorts of effects.

Here are a few to try:

Dotted


Dashed


Double


Groove


Ridge


Inset

The Flogging 

Now the obligatory 'I am going to try to flog you something' bit.

This is a great book to learn CSS from.

I am currently reading it at the moment, so can recommend it. I am not a web professional, I am just a layman that likes to read strange non fiction books. If you plan to just use CSS on Squidoo, then perhaps you wont need this. If you are into web design and development, then it is really good and crucially, easy to read.

Note I didn't use one of my boxes to promote the product.

Orange, blue, What else can you do? 

Hope that this helps you make millions or more importantly get some serious points across. Now get boxing.

submit

It would be great if you could:

Favorite this lens

Email it to a friend

Give the page a star rating

Make me a cup of coffee
Thank you.

by Dad-The-Lad

Dad-The-Lad gave up his job to stay at home and look after his daughter. She was 6 months old at the time - now she is three. They have lots of fun. (more)

Explore related pages

Create a Lens!