socialgo
Oct 23rd

CSS3 yet and not yet

By ezra vancil
The new CSS3 will provide many features that were not available with CSS2 and older applications. While some of these features are still being developed, there are others that are working right now as well.

One of the new features is called "substring matching attribute selectors". There are three additional attribute selectors provided for matching substrings in the value of an attribute.

*[att^=val]
Represents an element with the att attribute whose value begins with the prefix "val". The selector does not represent anything if "val" is the empty string.

*[att$=val]
This will represent an element with the att attribute whose value ends with the suffix "val". Again if "val" is an empty string then the selector doesn't represent anything.

*[att*=val]
Represents an element with the att attribute whose value contains at least one instance of the substring "val". Just as in the other two, if "val" is the empty string then the selector does not represent anything.

Another feature of CSS3 is the ability to manipulate borders. You can play around with border color, border image, border radius, and box shadow applications to customize borders.

**Border-color
At the moment this is only available to those using Mozilla/Firefox browser. By using the CSS code available you can change the color of the border around a boxed set of text. Want the border around your message to be blue, just use the CSS code. Red,yellow, gray, or whatever color you want can now be used to give your borders more style.

**Border Image
This currently works in Firefox 3.1 and Safari. This feature is split into two categories which are border-corner-image and border-image. Instead of using the normal border of any element, you can now just use this feature to change the images around the border. You can change the corners or the whole box if you wish.

**Border Radius
This can be used on Safari 3 and Mozilla Firefox. This function allows the corners on a box to be rounded. You can choose to round off just one corner, or round off all corners of the box.

**Box Shadow 
This can be implemented in Firefox 3.1 and Safari 3+. Color is one attribute you can alter as well as three lengths that can be used. 
1. Horizontal offset of the shadow means that the shadow will be to the left of the box if using a negative offset, or will be to the right of the box when using a positive offset.
2. Vertical offset puts the shadow on the bottom of the box with a positive offset and the top of the box with a negative offset.
3. Blur Radius means how blurry you want the shadow to appear. A setting of zero will mean there is no blur and as your setting goes up the blurrier the shadow will be.

There are also other features for CSS3 that deal with colors. A feature that can be used with Mozilla, Konquerer, Safari 3 and Opera 9.5 is HSL colors. HSL stands for hue, saturation, and lightness. The colors and tunes are now available in a much wider spectrum than they were previously.

**Hue is a degree on the color wheel. The basic values are green is 120, blue is 240, and red is 0 or 360. Different shades are represented by the numbers in between.

**Saturation deals with a percentage value with 100 percent being the full color. 

**Lightness also deals with percentages, with black being zero percent and 100 percent being light. 

HSLA sets the opacity of an element and is currently only available for Firefox 3 beta and Safari 3.

There are also features you can use that apply to user interface. These include box sizing, resize and outline. 

**Box Sizing
Can be used with Firefox and Safari 3. Changes the behavior of the browser in calculating the width of an element. By using the border-box setting the browser will render the box with whatever height and width are specified while also adding the border and the padding within the box.

**Resize
Allows user to specify if a box can be resized. You can resize vertically, horizontally, or both.

**Outline
Currently works in Safari, Firefox and Opera. Offset can be rendered away from the specified element, and the outline will be another box surrounding the border. 

These are only some of the features available with the new CSS3. There are also newer features that are presently in the works as well. 
May 4th

CSS 101: Block & Inline elements

By ezra vancil
Our last podcast looked at placing our logo in the header and creating a rollover effect. If you recall we had  to change the "header h1 a" into a block element. I said I would write a blog on block elements, and true to my word 67% of the time,  here we go. 

Play with Display
If your new to CSS, you've probably stayed away from the "Display" property. Well you might be missing out on a powerful tool. It only has to values, or three things it can do, so it's easy to remember . 
  1. display: inline;
  2. display: block;
  3. displa; none; 

All three of these values are extremely useful. Think of the display:none that we used in last weeks tip on hiding elements on a page, like the birthday element that so many ladies hate... display:none; You can even hide sorts of stuff you don't want on your page and is not yet an option in the layout manager.

Block and Inline are just as powerful. Lets say you want the background color of a DIV with a ad or image in it to automatically span the width of your text, so as not to worry about setting an exact pixel width. You would use the INLINE value to do this, because a DIV is a block element.

The difference between Block and Inline These are the most common elements that are blocks, and it's pretty easy to see this because they are usually designed visually as blocks.

 




A Block element starts on it's own line. Think of everything on your web page like the flowing of text a paragraph. Block elements are when you hit the enter key and go to a new line. So if you have say a Block element like a H1 under a inline element (think text) your block element will drop down like you hit the enter key.

Here are some inline elements:
 
 
 
 

The main difference between a block and a inline is hight and width, or those are at-least the most effective differences. A inline element's height and width, line hight, and top and bottom margins CAN NOT be changed. It will also span the width always of the image or text and can't be changed. It also begins on the same line.. so no enter key.

Useful Block

Blocks are very useful for image replacement. Like we put a image inside of a inline element the "a" element. If you don't turn that "a" element into a block, there is no adjusting it's hight or width, so more than likely, you will not see your full image. So simply put display: block; as a property, and your set, now you can fit the "a" around your image, and it will be linkable. I use this allot in SocialGo Design.

Useful Inline A good way to use the inline value is in setting a Block element, say a DIV, to be inline, giving it a background color, and allowing it to span the width of that inline element. See, a Inline element will just go and go until something stops it, so you can allow that background color to go the width of the text and you don't even have to specify a width. So that's about it. Inline is kind of useful, you will find places for it as you get deeper in CSS, but Block is very useful, and a must in many situations.
Apr 30th

Translate CSS tricks

By ezra vancil
We will be styling a google translate tool like I have done on little prayer box.  

If you just want all the code and don't want to read all this, just skip to the bottom and follow instructions about changing your URL.

translate.png

I'm seeing the google translate tool popping up every where on Socialgo Networks and I thought I'd offer up some CSS to style those puppies. 

Here is the full translation HTML code you will need for this exercise: translate code.  If you already have the code up ( take a look at mine to make sure it is the same google translate code) just ad a DIV that wraps all the code and give that div a ID of "translate": 

 
google code here

And if you want it to say "translate" insert this P element:


Translate to:

google code here
Note: the image resides on my server, so I can't promise it will always be there. you can replace it in the CSS coming up.

If you are using the google code I'm providing you will need to insert your URL where it says "yoursite.com." you can do this with a easy search and replace with most text editors. 

The CSS 
Here is the CSS you can add it to the head of your SG site in the custom HTML area. Make sure you put it between open and closing STYLE  tags. First the "translate" DIV we just added.  

Here we will set the position to fixed that way it does not scroll with the rest of the page:
#translate {
        position: fixed;        
}

We will also give it a enormous z-index, just because I don't know what z-indexes you are already using:
#translate {
        position: fixed;
        z-index: 2000;  
}


We will drop the width so to make our flags line up vertically:
#translate {
        position: fixed;
        z-index: 2000;
        width: 12px;    
}

Now we will add a image I made. It is a black PNG with the occupancy dropped to about 12%:
#translate {
        position: fixed;
        z-index: 2000;
        width: 12px;
background:  url(http://www.networklogic.net/widget/images/translatebg.png);
}

Here is the important part - the margin. As you can see on my little prayer box network, I wanted the translation tool to float just under my banner. You may want different and this "margin-top" is where you will adjust that:
#translate {
        position: fixed;
        z-index: 2000;
        width: 12px;
background:  url(http://www.networklogic.net/widget/images/translatebg.png);
        margin-top: 186px;
}


Next we will add a float... and I'll be honest, I don't know why I added this, it shouldn't matter. But we will add it for fun, you can mess with it:
#translate {
        position: fixed;
        z-index: 2000;
        width: 12px;
background:  url(http://www.networklogic.net/widget/images/translatebg.png);
        margin-top: 186px;
        float: right;   

}

Next I will just add some padding, take out the margin and then a small 1px border:
#translate {
        position: fixed;
        z-index: 2000;
        width: 12px;
background:  url(http://www.networklogic.net/widget/images/translatebg.png);
        margin-top: 186px;
        float: right;   
        
        border: 1px solid #666;
        padding: 10px;
        padding-left: 3px;
        margin-left: 0%;

}

Now I'm going to do my ocpancy roll over so the flags are slightly transparent.. You can add this if you want. First I set the opacity for the flags real low, then on the ":hover" state I bring it all the way up:
#translate a {
opacity: .2;

        
}

#translate a:hover {
opacity: 10;

        
}


Put it all together
Last I'm going to do a image replacement on the p tag. I've shown how to do this numerous times. You can look here for a start.

So here is the CSS in full. Just replace the image urls with your own if you want, and add it to your header area between style tags.
#translate {
        position: fixed;
        z-index: 2000;
        background:  url(http://www.networklogic.net/widget/images/translatebg.png);
        width: 12px;
                margin-top: 186px;
        border: 1px solid #666;
        padding: 10px;
        padding-left: 3px;
        margin-left: 0%;
        float: right;
        
        
}

#translate p {
        
        display: block;
        text-indent: -2000px;
        background: url(http://www.networklogic.net/widget/images/translate.png) no-repeat;
        height: 40px;
        margin-top: 0px;}

#translate a {
opacity: .2;

        
}

#translate a:hover {
opacity: 10;

}
Very Last add translate HTML code (with your URL replaced, or add the div and P tag as we talked about above) to your BODY area in the custom HTML section of your admin.

Remember you can adjust the Margin-Top on the #translate CSS  to move it up and down.

If you need a really easy fix and don't want to do all this then you can download this CSS and HTML txt file and dump it in to your body section. BUT! you will still have to replace all instances of "yoursite.com" with your URL.
Apr 14th

CSS Cheat Sheet

By ezra vancil
Sheww.. Just on the back end of designing the Widget Laboratory Socialgo Template. It was allot of fun, tried some new CSS tricks and Java Script. Take a look! I Hope to do a big long drawn out series either by blog or podcast to show the inner workings of WL. For now though...Here is a CSS cheat sheet I made for a friend that keeps all the important elements of CSS within reach. I hope it helps you out. I'm also doing one on XHTML and the big feat a map of Socialgo Classes and Id's, probably more of a booklet than a sheet. 
Enjoy!

csshelp.jpg 
Apr 7th

podcast 6: Companion 3

By ezra vancil

You can view the podcast Prosocialgo here

  It is a good idea to learn to work from the provided socialgo CSS theme template. I grab that CSS with Html scout. Just load the page and click the style or CSS tab. Copy and paste it into your own CSS doc. But as I have used in this tutorial series, you can just copy and paste as you go using firefox plugins like firebug. Here is how you set up a CSS and HTML to use on your hard drive. After your done, you can either put the CSS on a server and link to it in your Header are of custom CSS area of Socialgo admin. Do this like so:

 
Now your Socialgo will read that CSS style sheet. This is cool cause you can update the style sheet then upload it, then ta-da, your whole site is updated, no going to the admin and copy and pasting css into the header again. Here is how you set up your CSS and HTML: I will be working from my own style sheet and HTML on on my hard drive. The way you do this, if you don't know, is to go to the page you want to work on. In the menu click "View," or something similar in all browsers. Select "View Page Source," Then copy and paste this into a html doc. Replace any info in the doc with this. Save it. Now create a blank CSS, save it in the same root folder. Now look for this code between the header of your HTML doc:


Replace the URL of the theme style sheet, in this example "38597-1238993918.css" with the url to your new style sheet in your root folder, it should look something like this mycss.css if you put it in the same folder as the HTML. Cool now when you change the css and save it will effect your html. you can keep your HTML open in a browser and just refresh to see the changes. If you are working in Dreamweaver or something similar, just delete the entire theme CSS and link to your own CSS through the CSS palette. In dreamweaver it is in the lower left hand of your pallet, a little chain icon.

Part one, two 
Mar 12th

Using CSSedit Milestones

By ezra vancil
I'm kinda pissed right now. I just wrote a nice informative blog about CSSedit, and went to submit, my internet connection coughed, and it was gone. But you know what, that makes me love CSSedit's Milestone feature allot more. I wish everything, including this blog had a milestone. Imagine having a trail of CSS versions all the way back to the start of your project... wouldn't that be great. Or, being abel to experiment on your CSS theme without ever worrying about screwing something up. that's the power of the Milestone feature. 

Lets say everything is looking good, but I want to see what the whole deep purple site looks like in lime green, or better just create a lime green site for saint patties day, and toss it later. 

Here is what you do:

First, save your working version as a Milestone:

savemilestone.png

Second, Name your milestone and don't worry about date or time, it does that for you.
namemilestone.png

When your done with your Lime Green styles, do the same, save it... and if it looks like crap or Saint paddies day is over, just revert. It's like having thousands of variation style sheets in one. 

 openmilestone.png

Thats it.

Debugging with CSSedit 

By combining CSSedit's infinite undos you can also use this as your debugging method. 

Just think, you've put hours into making your blog post look like bling on a stick, only to find it totally screwed up your profile pages. Easy. Just save all your work in a milestone, and start hitting the control-z. Watch the preview page, and when you see one of the problems disappear, make not of that CSS declarations you just nixed with control-z. Keep doing this until you have the profile page looking good again, and a list of all the declarations that changed it for the better when you un-did them. 

Now go back to the milestone that contains all your Blog work, and simply search for those CSS tags. Now you can either paste in those old CSS attributes, or mess with the ones in that milestone... but at least you know which ones they are, and don't have to dig for hours. This little trick usually takes me about 1-2 min to scour through hours of CSS. 
Jan 29th

Tame your posts: Part 1 - Images

By ezra vancil
Ok, so I'm a control freak. But, if you think about it that's actually not a bad quality for a designer,
Ok, so I'm a control freak. But, if you think about it that's actually not a bad quality for a designer, though my wife may differ. 

My wife and I had a little tiff the other day over a blog post. See, she found a tragic story of someone being persecuted in a foreign country, that i don't remember right now, and she wanted to post it right away for the other members to see.  It was a worthy post for my other network, little pray box, so why did I nearly fall over the coffee room table trying to delete it. Well, because I'm a control freak and the post looked horrible, with bullets and ordered lists naked and plain, images that had no style. It simply made my design look bad. Man, did she get mad; she said I cared about my site more than the people in whatever country that was. I tried to explain that my site looking like that was like her out to dinner with a dangling booger. She didn't get it. 

I finally had some time and fixed the post up a bit, and then I decided I wouldn't allow my members to put ugly lists and plain-jane pics on my blog.  So I got out the CSS. 

Now the truth is, they can always override my styles if they are handy with the HTML editor in the post section. But I don't think many will, and if they do, they will be banned. :)

We'll work with the few tags that are provided in a blog post.
Jan 28th

101 CSS/XHTML: Your P's & Q's

By ezra vancil
I admit it, I call everything, absolutely everything XHTML, CSS... even my children, "tags." This can be very confusing for those that thought it profitable to learn the actual terms, which I was one of. I'm not a big terms kinda guy, I don't retain that kind of stuff well, preferring "doo-hicky" and "that thing." But some people seem to obsess, describing the ancient Latin origins of "cascading style."

Like them or not, terms are very important, but truthfully you don't have to know any of them to make up a mess of code. I actually didn't know one term of HTML or CSS until about 1 year in and a few national awards richer. I finally admitted my ignorance when I got embarrassed at a awards ceremony when I couldn't even enter in a conversation about my own site! So... I figured, I better learn some P's and Q's. And, you will too if you ever want to communicate with another developer coherently, or to know what the hell I'm talking about... because, though I do use "tags" when I'm talking to my dog and children (My quality assurance managers), I will use the actual terms with you, because I don't want you to bare the shame of calling a selector a property in the wrong crowd. 

Here is a visual layout of all the most common terms, or at least, most of the ones you'll need to follow in our podcast, until we get into parent child selectors, nth selectors etc.. but we'll make sure your up to speed.

101-XHTML-TERMS.jpg

CSS terms visualy laid out

Jan 28th

101 Fundamentals: Selectors

By ezra vancil

I've had allot of questions from other Socialgo'ers that smelled strangely of my early days and I want to scream stop! go back to go and collect $200. I decided to create a ground zero fundamentals series, and I hope it's helpful to those brand new to code, and those looking to sturdy their foundation.

A huge mistake I made, and still constantly make, is the lust for instant gratification at the expense of knowing what I'm consuming. Translated to XHTML and CSS this seemingly ambitious drive to get to the good stuff, causes what I call Rat's nest Code. Hey, but it does the trick right? Maybe, kinda like duck tape does the trick.

The problem with racing down the road with out knowing what all the road signs mean is you'll eventually collide head first with a pedestrian, and that pedestrian is usually one of your pissed off users, a client or a boss. How this happened to me, countless times, is I got the site going, looking good -- by the skin of my teeth. Then 4 months later, after I had done twenty more sites, tragedy struck. Something goes wrong, someone sneezed on your CSS or something and you got to go rescue the site. Well I would open up those four month old sites and nearly collapse. I didn't remember what I did, or how I did it. I had ripped most of the code from other sites and the rest ducked taped together with 20 different tutorials from 20 different versions of how to code. I can't tell you how many cuss words I learned back then, some of them would make the 18+ sights blush.

For you as a socialgo network owner,it probably will mean loss of members, loss of profits, loss of confidence.

I've only been at socialgo for a short time, and I have already broken my sites, in a big way, accidentally. ( Usually   because if you have several networks, whenever you go to admin it still pops back to your first network on the list. well, I'd go in the wrong network and start deleting stuff and so on..)

The malfunction, for me at least, was simply that I didn't know what the hell I was doing and didn't want to admit it. I'd learned how to steel code and make it work, but I never learned how to write code and understand how it was supposed to work together.

I finally forced myself to re-read all those books on my shelf and pay attention to the 90% I skipped over.

(By the way, after my little sermon, my code is still ratty... I'm working on it)

This is the real beginning fundamentals, so if you know all this please skip to the next blog.

SIMPLE SELECTOR

A HTML page is made up of ELEMENTS and ELEMENTS are different structures like buildings.


Here is a

ELEMENT:

I talk to my dog because Farty the cat has bad breath

With a CSS SELECTOR, I can grab hold of a TAG by it's NAME Like this:

 p  {}
Thats it!

p is

's name. This is a SIMPLE SELECTOR because it's so damn simple. Now I can tell this p what to do with CSS.

ID SELECTOR

But, hell there are like two thousand

's in my network, what if I just want to grab hold of one element that talks about my dog's breath. Just like I my State ID refers to me in a broad term saying that I am a MALE- and then in a specific term, that I am EZRA. The element works the same. I just have to give it the specific name, we'll call it Hara because that's my dogs name.

#hara {}

That's it! This is a ID SELECTOR.

Class SELECTOR
Now, lets say my Network is all about dogs and cats and I want all the Cat Elements to be orange and the dog Elements to be blue. Because dogs and cats are two different CLASSES of animals; I have to give them a CLASS so instead of a specific name ID like
 


I'll give them a class so I can call all the dogs and cats:


Think of it this way:

= animal

= dog

= my dog

now I'll call the cats with CSS:
.cat {}
Thats it. This is a CLASS SELECTOR.    

Wrap it up Now
To close it all up I'll show you what it looks like when I order my dogs and cats to be orange and blue. We'll do this by commanding the selectors with Properties and Values which we will be covering in the next lesson. Here is a peek at how it looks all together:
.cat {

 color: orange;

 }

.dog { color: blue; }
and i'll make my dog pink.
#hara { color: pink; }
Jan 24th

5 CSS Hammers for 5 Jobs

By ezra vancil
If your like me you have a mound of tools in your garage but know where everyone is and the reason you bought each one. My wife asks why i need another hammer when i have four in the garage, well, of course, it's because one is a tacker, another a roofer, a decker and a nut scratcher. Duh! I'm the same way with CSS inspectors, I have a bunch and they all help me in different ways and in different circumstances, and, of course they are all firefox plugins.

firebug.jpg

Firebug

This is my big ass deck hammer... You probably have heard of this one or have it. In it's most basic use, it allows you to analyze visually the html next to the CSS. f I use this allot when I can't seem to find a sneaky attribute or tag in dreamweaver or cssEdit. for some reason I always find it with this little bug. It does allot more too, like inspecting DOM, which has helped me a ton lately on finding how a certain effect is constructed on a site. But, overwhelmingly I use it at the very end of designing my network. After I've carefully coded my page design in a css editor I plop it in socialgo and low and behold my footer is shooting off 20 miles to the west. This is usually because I deleted a CSS declaration instead of replacing it, and now the socialgo template is trumping my selector. So, I pull it up in firefox, find the offending selector and fix it right there, copy and paste it into my CSS. (IMPORTANT! Remove the code line data!!! or your $%^&) So it's more like a de-bugger for me.

cssviewer.jpg

Css Veiwer
This is my tack hammer I use all over the house and is always in close reach. It is a very simple plugin and does it's job beautifully. Just hover over an  element   and you get a very easy to read style guide to that element. Ya firebug does this too, but this is for quickies when I'm on a site and I just want to see quickly and clearly how someone accomplished an effect. You don't have to go back and for to the firebug window pain, it just pops up on screen and you are enlightened and face a deep moral de-lima whether you will just swipe it and run, or actually learn something and do it yourself and escape the fires of web developer hell where you are force to view all your creations on IE5 (mac) on a 600x401 screen (it's that one extra pixel that kills you) for eternity.

editcss.jpg

EditCSS
Just recently turned on to this one and man it's cool. It's my big fat monkey roof hammer (that I know all too well). I can just pound away and always seem to hit something I'm supposed to. Once I have been working on my style sheets for a couple of weeks I can read them like Joseph smith (mormon founder) throu a funky hat, one selector at a time. So when I know it this well it's easy to open up EditCSS and make a few big changes on the fly. firebug doesn't allow you to add selectors (if I'm wrong please help) though you can add declarations. You can addanything with EditCSS and watch it change on the fly. This would be great for those of you that want the live preview but don't want to drop the dough on CSSEdit, or that other PC version that just slipped my mind.    


Web Developer 
This one is my scratcher hammer. I used to use it much more than I do today. the CSS editor is a steaming pie and some other functions also are useless in my book. I actually
said I liked this plug-in on a podcast, I think I was mixed up. But I do scratch with it every once in awhile and where it gets the itch is downloading style sheets for my network, keeps the format most of the time when I just copy and paste and of course you can just use the url it gives you.

 
I have a few others but they are just nostalgia. Enjoy, and let me know which one is your favorite hammer.
 

    About us

    Pro socialgo was created and is sustained by a husband wife team. The hope behind the experiment is for SocialGo Owners to join together in a mutually profitable creative endeavor to see how far socialgo can really go. Pro socialgo has set many platforms in place to deliver premium-learning materials for creative minds that want to exploit all the riches of self-made social networks. Who knows what we can accomplish if we put all our heads together and strive for higher standards and knowledge of our craft. Ya, we're glowing eyed optimist, but hey... beats a kick in the.

  • Little Prayer box

    Check out Little prayerbox.com the site Ezra cut his teeth on. You’ll notice a few similarities, but there is nothing wrong with stealing from yourself is there? go There Now