Posts Tagged ‘CSS’

Are hiding H1 tags bad for SEO?

Thursday, November 12th, 2009

This is one of those questions that I have seen over and over. I have come up with my own methodologies of doing this, in fact, I did it on this blog at one time, however I have always found that if you are trying to hide something, Google and the other big engines will look at it as hidden. Google may also penalize you for this, since this is something that could likely be considered Black Hat. Don’t get me wrong, I wish that we could do this, especially since the Word Press H1 tag is in the header. This is a situation in my opinion where you need to use H1 as what it is designed for TEXT. This is one of the most important attributes in organic SEO, so why would we want to trick a browser that could black list you in some way, drop your rankings. My suggestion is to position the H1 text in a way that it looks like your brand instead of fighting against it. Use relative position to move your text so that it lays on top of a background image and looks as if it seamlessly sits in the design.

So, I want to know what YOU think!

Thursday, November 12th, 2009

This is one of those questions that I have seen over and over. I have come up with my own methodologies of doing this, in fact, I did it on this blog at one time, however I have always found that if you are trying to hide something, Google and the other big engines will look at it as hidden. Google may also penalize you for this, since this is something that could likely be considered Black Hat. Don’t get me wrong, I wish that we could do this, especially since the Word Press H1 tag is in the header. This is a situation in my opinion where you need to use H1 as what it is designed for TEXT. This is one of the most important attributes in organic SEO, so why would we want to trick a browser that could black list you in some way, drop your rankings. My suggestion is to position the H1 text in a way that it looks like your brand instead of fighting against it. Use relative position to move your text so that it lays on top of a background image and looks as if it seamlessly sits in the design.

So, I want to know what YOU think!

CSS: How to Create a Basic Inline Style

Monday, November 2nd, 2009

One of the easiest ways to change the way a specific <div> <span> or paragraph tag’s looks on your web site is to change the style by doing it “inline”. Inline refers to editing the code directly in the line of line of the HTML, instead of updating an external style sheet, or a style sheet that is defined in the header of the page. This is something that I do not usually recommend, however there are instances that require this on the fly. An inline style will override a style that has already been established in the external style sheet or the header. One good example of this, is if you need to adjust the height of a specific <div> however do not need to update the style sheet. For example, you have an frame for an image that needs to be in a containing <div> that is 400 pixels tall.

In this example, we will simply define the height of a div with inline style.

&lt;div class="someDiv" style="height: 400px"&gt;

The “style” parameter, will begin the style attribute. After the quote marks, you can use any CSS value here, and as many as you like separated by a semi colon. Below, we will use multiple attributes.

&lt;div style="font-size: 24px; font-weight: bold; color: red;"&gt;Some Words You Have Written&lt;/div&gt;

Some Words You Have Written

As you can see it is very easy to add an inline style, just make sure that you do not make a habit of this, however use it when you need to.

Website Review of the Day – Speak Visual

Monday, November 2nd, 2009

speak_visSpeak Visual -
http://www.speakvisual.com

NVIDIA, a computer company that builds graphics cards has recently created a website to promote its technology. The theme, Speak Visual is centered around several [people speaking about how they use NVIDIA cards to “Speak Visual” to the world. The vibrant color, contrast, and use of white space all work together to create a very well rounded site that is full of video clips, graphical imagery, and animation. Basically the company is visually introducing you to some of the things that their graphics processors can do and why you should upgrade your PC. The site is captivating and very realistic, with movement, video of people, and interviews. This is what I believe thaat the web will evolve into, a high definition portal to visually interact with.

Designers Vs Developers

Thursday, July 23rd, 2009

Sometimes I like to rant a little about the separation between designers and developers. Some will say that a developer is anyone who can build a web page. Many say that a true developer can write a 2000 line SQL stored procedure in his sleep. Obviously if this was true, anyone less in skill would just be called a Web Editor or something like that. I am not sure what is the right title, I do not really care, all I know is that there is a major rift between programmers and designers – which there should be to a certain degree.
Many of my issues come with territory. Is it a designer’s territory to learn about front end development such as CSS and web page layout, absolutely! In my opinion, there are two types of web designers out there, designers that can develop and designers that are clueless about web technology. From what I understand in many design schools, web technology is not being stressed enough such as PHO, CSS, MySQL, and web server administration. These tools are essential to the web designer! These are the things that a web designer needs to know and continually practice so that he or she can build or know how to design a web page. In many cases there is no design thought of dynamism in Web Pages other than flashy animation and style by the designer. Do we ever think about how text might change to break a layout? D0 we ever think about how a search field should look? Sometimes, but most of the time we just make it “pretty” and go from there.
What do I recommend for up and coming designers? Technolgy will always change so knowing what is hot is good, however the ability to design and creativity will never change, you either have it or you don’t it is not something that can just be learned through a book. Aesthetics are what they are, however the ability to truly combine technolgy and design is not just a skill but a talent.

CSS text kerning for your web pages

Wednesday, July 22nd, 2009

Have you ever felt like you were limited in the things that you could do with your typography on a web page? I have, before I knew what CSS was, one of the things that always wanted to do, but was not available back in the day was apply kerning to my web pages without having to create a custom graphic. A custom graphical text is always going to look cooler, however for particular reasons you may not want to do a graphic for every time you create some text, such as a dynamic photo caption pulling from a database.

The CSS parameter you want to use is called letter-spacing. Yes, it is that simple!

Anyways let begin. Lets say I want to have a caption for my photo that looks cool and well designed. The first photo caption is standard.

CSS Kerning tutorial

Our beautiful lake

Now Check this out!

CSS Kerning tutorial

Our beautiful lake

Doesn’t this look much better?

Anyways, here is the CSS
Take your text and wrap it in a <span> tag. This tag helps you apply a style to the text easily, however this is not the only place to use style. </span>

<span>Our Beautiful Lake</span>

Next add a style and the line spacing:
<span style=”letter-spacing: 5px”>Our Beautiful Lake</span>

The result is:  Our beautiful lake

It’s that easy! Hope this was helpful.

Cropping an image on the web using CSS

Monday, April 20th, 2009

Ever had an image that you could not re-size, or did not want to re-size, however wanted to crop? Maybe the image was too large for your page or, you just wanted to show a small portion of the image. Using this technique you can also position text on top of the image, like a caption, without having to edit the image. This a very cool method to use, if  for  SEO purposed or to be reference the text in the HTML.

The intention is for you to use the CSS in the header of your document or in a linked Cascading Style Sheet (.css)

First lets start with an image as illustrated below:

pontiac_g6

I need to crop this image and I want to give it a caption directly on the photograph. For this particular instance I just need to show the front of the vehicle.

First I will start by creating a DIV contain for this:

<div><img src=”http://myserver/mycar.jpg”></div>

Above is a line of code that creates just a simple container. Next we need to create a class for the image for the CSS. You will actually use the class tag within the image tag to call to the CSS. The CSS class beloow will be added to your stylesheet.

.image {
border-width: 1px;
border-color: #ffffff;
border-style: solid;
width:225px;
height:70px;
background-position:50% 95%;
background-repeat:no-repeat;
}

In the CSS code above, I have created an image class with a 1 px border and and an area much small than the image. I have also told the background not to repeat itself.

Pontiac G6

Above you will see my cropped image with a title at the top in black. To make the image appear you HAVE to put in some kind of text for the image to show.This is what I used for the code:

<div class=”image” style=”background-image:url(http://myserver/mycar.jpg)”><div>Pontiac G6</div></div><br />

Notice that I had to use a little in-line CSS to make the image appear (background-image). This way, you do not have to put the background-image URL in your style sheet, in the case if you want to have several images cropped with a specific size using the .image tag as a reference. Also make sure to have the break behind the last DIV.

Now, how would I make the text in visible in a different position and in a different color? Start by creating a “title” class like we previously created the “image” class.

.title {
font-family: Arial, Gadget, sans-serif;
font-size: 14px;
font-weight: bold;
color:yellow;
position: relative;
top: 25px;
left: 30px;

}

Pontiac G6

Above you will see that I have positioned the text and have styled it to be a different font, color, and weight. By setting the position to Relative and adjusting the top and left, you can position your text to be anywhere within this DIV container.

Again, this is a case where we created a style with the CSS file so that we could create a “template” of sorts that we could reference again. The other method is to put all of the styling within a “style=” tag within the DIV.

CSS vs Tables 2009

Thursday, April 16th, 2009

Today I had an interesting debate with a developer regarding which is superior using tables or CSS. The particular website we were reviewing uses both, DIVs and tables, however the main structure/container is a table, with DIVs within. It has been known that developing websites with DIVs rather than tables creates a much faster load time, more SEO friendly, and is more 508 compliant. These are all somewhat true to a certain extent. Each website is subjective to how it is built, how many graphics are present, and how much data is involved. Also if your web sever is generally slow or you have to many users for how much bandwidth you have, will make a difference as well. I personally prefer to develop with CSS now, however there are several websites I update that still contain tables. The one nice thing about developing with CSS is that once you get your general structure down, you can easily change the look of your website in some cases without even touching the PHP, HTML, or ASP file you are working on. How is this so? The CSS file that is linked to your wesbite provides all of the styling, size, and looks. You can easily change the parameters of this CSS file with different graphics. CSS Zen Garden s a great reference for this.  So, when are you going to say, hey look Mom, no more tables?