Search This Blog
Sunday, April 17, 2011
How to Increase the Display of Your Browser
If you use a laptop or notebook you may have trouble reading text on a web page. You can increase the size of the display by holding the Control key down and rotating the mouse roller (between the left and right mouse buttons) away from you. Conversely, you can decrease the size of the display by holding the Control key down and rolling the roller towards you.
Saturday, April 16, 2011
Creating an Electronic Form Using Word 2010 Content Controls
To create a form in Word 2010, the form fields are on the Developer toolbar in the Controls group. Click the Legacy option’s dropdown to see form fields (Word 2003) and ActiveX controls.
If Word 2010’s Developer tab isn’t visible, do the following to display it:
You can insert form controls directly into a document, but consider inserting them into a table instead. They’re a little easier to organize that way. For instance, There's a two-column, five-row table in the document shown below. In the left column, there are descriptive labels for the content controls. (Choose Table from the Insert menu/tab.) Here is where to enter the appropriate content controls into the right column. Specifically, enter two text fields, one date field, and two lists.
First, enter a text field for the class ID as follows:
At this point, you have three control.
Add a control that lets users choose an item from a list. Specifically, add a list of ratings so the students can score the instructor on preparation and content. Specifically, create a list of five possible scores, from very poor to excellent, as follows:
Repeat the above instructions to add another Drop Down List Content Control for the last cell in the right column. Or, simply copy it.
Once you’ve inserted all the content controls (or form fields), protect the document as follows:
If Word 2010’s Developer tab isn’t visible, do the following to display it:
- Click the Quick Access Toolbar dropdown.
- Choose More Commands.
- In the left pane, click Customize Ribbon.
- In the list to the right under Main Tabs, check Developer and click OK.
You can insert form controls directly into a document, but consider inserting them into a table instead. They’re a little easier to organize that way. For instance, There's a two-column, five-row table in the document shown below. In the left column, there are descriptive labels for the content controls. (Choose Table from the Insert menu/tab.) Here is where to enter the appropriate content controls into the right column. Specifically, enter two text fields, one date field, and two lists.
First, enter a text field for the class ID as follows:
- Select the first cell in the right column (to the right of the label, Class).
- Click Plain Text Content Control in the Controls group (on the Developer tab).
- Select the third cell in the right column and click Date Picker Content Control in the Controls group.
- Click the Properties option in the Controls group, set the format to m/d/yy, and click OK.
At this point, you have three control.
Add a control that lets users choose an item from a list. Specifically, add a list of ratings so the students can score the instructor on preparation and content. Specifically, create a list of five possible scores, from very poor to excellent, as follows:
- Select the fourth cell in the right column and click Drop Down List Content Control in the Controls group.
- Click Properties.
- Click Add.
- Enter Very poor in the Display Name control.
- Enter 1 in the Value control.
- Click OK.
- Repeat steps 3 through 6 to create the list shown below. When you’re done, click OK.
Once you’ve inserted all the content controls (or form fields), protect the document as follows:
- Press Ctrl+A to select the entire document (or select only the table if you’re working in a larger document).
- Choose Group from the Controls menu.
- Click Restrict Editing in the Protect group.
- Check 2. Editing restrictions.
- From the dropdown, choose Filling In Forms.
- Save the form, close it, and reopen it.
To use the form, press tab to select the first content control. Enter a class ID and press tab. Enter the instructor’s name and press tab. To enter a date, click the dropdown and click a date. Word will enter the date in the format you selected when you set the control’s properties. Press Tab to move to the next control.
The next two controls are list controls. Click the dropdown for each and select one of the list items.Word content controls and form fields are good way to implement control and consistency when gathering information.
Friday, April 15, 2011
An Easy Way to Color Correct in PhotoShop
Open a photo, and from the Layer menu and select “New Adjustment Layer”, then “Curves.” This insures you don’t damage the original image.
On the bottom of the curves window, you’ll see 3 little eyedropper buttons called “set black point”, “set gray point” and “set white point." The goal is to click each eyedropper in the blackest, grayest, and whitest parts of the image as you remember them.
Click the left “set black point” eyedropper. Find a point on the image as close to pure black as you can and click it.
Click the right “set white point” eyedropper. Find a point on the image as close to pure white as you can and click it.
If you can find something on the image that is gray (like 128,128,128 RGB) use the middle eyedropper. If you can’t find anything gray in the image, look for concrete or try the off-white part of a subject’s eyes. If you can’t find anything gray you’ll have to depend on the “auto color” feature, and that is a gamble.
What you are doing is telling Photoshop to ignore your monitor, ignore the image RGB values, and to balance every color in the image against a known black and white to set the density and a known gray point to fix any color cast.
The curves eyedroppers doesn’t always give the results you want. Sometimes you have to delete the curves layer and start over again. But the results are almost always better than the “auto levels," “auto color," and “variations” options in Photoshop.
On the bottom of the curves window, you’ll see 3 little eyedropper buttons called “set black point”, “set gray point” and “set white point." The goal is to click each eyedropper in the blackest, grayest, and whitest parts of the image as you remember them.
Click the left “set black point” eyedropper. Find a point on the image as close to pure black as you can and click it.
Click the right “set white point” eyedropper. Find a point on the image as close to pure white as you can and click it.
If you can find something on the image that is gray (like 128,128,128 RGB) use the middle eyedropper. If you can’t find anything gray in the image, look for concrete or try the off-white part of a subject’s eyes. If you can’t find anything gray you’ll have to depend on the “auto color” feature, and that is a gamble.
What you are doing is telling Photoshop to ignore your monitor, ignore the image RGB values, and to balance every color in the image against a known black and white to set the density and a known gray point to fix any color cast.
The curves eyedroppers doesn’t always give the results you want. Sometimes you have to delete the curves layer and start over again. But the results are almost always better than the “auto levels," “auto color," and “variations” options in Photoshop.
Create a Logon Message in Windows 7
In Windows 7, click on the Start button and type regedit in the search box. Click on the regedit.exe file in the list of items and answer the UAC prompt. Once in the registry editor (Figure A), navigate to this key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Policies\System
Figure A
Find the legalnoticecaption key in the right-hand pane and double-click it. Enter a heading for your message in the Value Data field, as shown in Figure B, and then click OK.
Figure B
To enter the actual message, double-click the legalnoticetext key in the right-hand pane and enter your message, as shown in Figure C; when you are done, click OK.
Figure C
A couple of caveats: the message has to be text-only and there is a character limit, and in order for this tweak to take effect, you will have to reboot your PC.
When you are happy with your message, close regedit and reboot — you should see your message displayed before you get to the official Windows logon screen.
If you decide you don’t want the message anymore, just delete the Value Data field for each of the keys.
Monday, April 11, 2011
Five tips for using Ccleaner to degunk your system
There are a lot of tools out there that handle a lot of tasks, from antivirus tools that also clean your drive of temporary files. Ccleaner is one fo the best and it's free.
Ccleaner easy to use and will keep your computer cleaner, more secure, and running faster. It achieves this by safely removing temporary Internet files (and other means of tracing Internet activity), cleaning up the Windows registry, and removing temporary files and recent file lists (MRUs) from various
applications.
But even though Ccleaner is a simple tool to use, that doesn’t mean you should just jump in and start cleaning everything without a bit of thought. Here are some things all users should consider before and during the use of this powerful tool.
Ccleaner easy to use and will keep your computer cleaner, more secure, and running faster. It achieves this by safely removing temporary Internet files (and other means of tracing Internet activity), cleaning up the Windows registry, and removing temporary files and recent file lists (MRUs) from various
applications.
But even though Ccleaner is a simple tool to use, that doesn’t mean you should just jump in and start cleaning everything without a bit of thought. Here are some things all users should consider before and during the use of this powerful tool.
1: Analyze before running the Cleaner
I know a lot of admins who just fire up Ccleaner and hit the Run Cleaner button without doing an analysis first. Yes, this is a fast method of getting rid of temporary Internet files. But there’s no way of knowing what’s going to be deleted (until it’s deleted) and there’s no way of knowing how much free space the deletion is going to create. Make sure you hit the Analyze button first. Then, after you read the report, hit the Run Cleaner button. Using Ccleaner this way ensures that nothing is deleted that shouldn’t be deleted. Also, after you run the analyzer, you can look at detailed information (by application) and then add exceptions directly from the list.2: Set up cookies you want to keep
When you run the Cleaner, cookies are deleted. By default, cookies are retained from Google and Yahoo, but other cookies might need to be retained. To manage this, click on the Options tab and then on the Cookies button. From that window, any cookie currently on the system can be selectively added to the exclusion list. By adding these exclusions, you don’t have to worry about important cookies disappearing after each run of Ccleaner.3: Always back up the registry
No matter how reliable Ccleaner is and no matter how many successful registry cleanups it does, never do a cleanup without first backing up the registry. Ccleaner will go so far as to remind you to back up the registry every time you run a registry cleanup. If the registry is not backed up, one of those corrupt or missing registry keys that Ccleaner fixes might not really have needed fixing. If that key is then broken and was not backed up, the issue caused by Ccleaner could become catastrophic. Fortunately, Ccleaner makes backing up the registry as simple as a couple of clicks.4: Use the tools to manage startup applications
Ccleaner comes with a bonus: It lets you enable, disable, or remove programs from startup. I have always found this method of managing startup applications far easier than using the standard Windows method. What I like most about this feature is that startup applications can be enabled and disabled without removing them completely. This means if you need to temporarily prevent an application from starting up, it’s easy to do by going into the Tools tab, clicking the Startup button, selecting the application to be enabled/disabled, and clicking the appropriate button. When the application needs to be re-enabled/disabled, reverse the process.5: Use the uninstaller
One of the best aspects of Ccleaner is the ability to remove applications from within it. It typically just starts the uninstaller, but I have found that running the application uninstaller this way ends with fewer registry issues than when I uninstall from the Windows Add/Remove Programs tool. And if there are registry issues after the uninstall, registry cleanup is only a couple of clicks away.Great tool, used wisely
Ccleaner is more than just a tool to clean the registry or empty a computer of temporary Internet files. It also makes it easy to remove applications from startup and remove applications from the machine. Just make sure you use this powerful tool intelligently to avoid rendering your machine unusable.What is Chromium?
Chromium is the open source project that serves as the foundation for Google Chrome. Think of Chromium as the bleeding edge version of Chrome created by the open source community. However, Chromium is not for everyone. It’s not nearly as polished or bug-free as Chrome, and while Chrome silently updates itself in the background, Chromium has to be updated manually (and there a new builds available almost every day). The process of updating to the latest build of Chromium is made easier by tools such as Chromium Updater
One reason to consider using Chromium over Chrome is security. While Google promises that Chrome isn’t reporting back to Google with any additional data about your browsing habits — at last no more than any other Web browser — you may not completely trust Google in that regard. The company has too much to benefit from gathering as much data as possible from every single user. Because Chromium is open source, if there was any kind of supposedly-harmless data collection going on, the open source coders would likely spot it and alert the community and the public. That, and the extra speed boost from running the cutting edge software builds, are what are some things to consider about using Chromium..
If you are using Mozilla Firefox (I quit using Firefox months ago) then checking out Chromium will likely result in faster, more efficient browsing.
One reason to consider using Chromium over Chrome is security. While Google promises that Chrome isn’t reporting back to Google with any additional data about your browsing habits — at last no more than any other Web browser — you may not completely trust Google in that regard. The company has too much to benefit from gathering as much data as possible from every single user. Because Chromium is open source, if there was any kind of supposedly-harmless data collection going on, the open source coders would likely spot it and alert the community and the public. That, and the extra speed boost from running the cutting edge software builds, are what are some things to consider about using Chromium..
If you are using Mozilla Firefox (I quit using Firefox months ago) then checking out Chromium will likely result in faster, more efficient browsing.
A registry tweak to make application choices more efficient in Windows
Every once in a while in Microsoft Windows, you will come across an unknown file type. When you double-click that file, Windows asks you to pick an application to open that file, but only after it first offers to check a web service for potential applications (Figure A). Most of the time, you know exactly which application you’d like to run for the file in question, so the web service dialog box is more annoying than helpful.
Note: This Quick Tip is using Windows 7, but the basic principle should apply to both Windows XP and Vista.
Figure A
Close regedit. To restore to the default, just change the value of the NoInternetOpenWith key to zero.
Note: This Quick Tip is using Windows 7, but the basic principle should apply to both Windows XP and Vista.
Figure A
With a small tweak to the Windows Registry file, you can permanently skip the Use the Web Service to Find the Correct Program dialog box and get right to the list of potential applications (Figure B) already installed on your system.
Figure B
Registry Edit
Standard disclaimer: The Windows Registry File is vitally important to the proper operation of the Windows operating system. Please back up the file before you make any registry edits.Click on the Start button and type regedit in the search box. Click on the regedit.exe file in the list of items and answer the UAC prompt. Once in the registry editor (Figure C), navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
Figure C
Right-click in the right pane of the editor to create a new 32-bit DWORD value with the name NoInternetOpenWith (Figure D).
Figure D
Right-click on NoInternetOpenWith and navigate to the Modify menu item, then enter a value of 1, as shown in Figure E.
Figure E
A registry tweak to make application choices more efficient in Windows
Every once in a while in Microsoft Windows, you will come across an unknown file type. When you double-click that file, Windows asks you to pick an application to open that file, but only after it first offers to check a web service for potential applications (Figure A). Most of the time, you know exactly which application you’d like to run for the file in question, so the web service dialog box is more annoying than helpful.
Note: This Quick Tip is using Windows 7, but the basic principle should apply to both Windows XP and Vista.
Figure A
Close regedit. To restore to the default, just change the value of the NoInternetOpenWith key to zero.
Note: This Quick Tip is using Windows 7, but the basic principle should apply to both Windows XP and Vista.
Figure A
With a small tweak to the Windows Registry file, you can permanently skip the Use the Web Service to Find the Correct Program dialog box and get right to the list of potential applications (Figure B) already installed on your system.
Figure B
Registry Edit
Standard disclaimer: The Windows Registry File is vitally important to the proper operation of the Windows operating system. Please back up the file before you make any registry edits.Click on the Start button and type regedit in the search box. Click on the regedit.exe file in the list of items and answer the UAC prompt. Once in the registry editor (Figure C), navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
Figure C
Right-click in the right pane of the editor to create a new 32-bit DWORD value with the name NoInternetOpenWith (Figure D).
Figure D
Right-click on NoInternetOpenWith and navigate to the Modify menu item, then enter a value of 1, as shown in Figure E.
Figure E
How to apply your favorite Word styles with a single click
Word’s new Quick Gallery (in Word 2007 and 2010) provides a one-click method for applying a style but only a few styles are available. The Quick Style Gallery displays the first few Styles (listed in the Styles pane). If the styles you use the most are at the bottom of the list, they’re not visible in the ribbon group and therefore, not available with just a quick click.
Fortunately, you’re not stuck with the default arrangement; you can move your most-used styles to the top of the list and into the Quick Gallery as follows:
- Click the Styles dialog launcher to open the Styles pane. The launcher is the small arrow in the bottom-right corner of the group.
- Click Manage Styles at the bottom of the Styles list.
- Click the Recommend tab.
- Select the style you want to move. (Use Sort Order to display an alphabetical list if that helps.)
- Click Assign Value and give the style a value from 1 to 99—a value between 1 and 4 will push the style to the ribbon display.
- Click Show.
- Choose As Recommended from the Sort Order dropdown.
- This behavior belongs to the specific document, by default. If you want to move a style to the Quick Gallery for all documents, be sure to click the New Documents Based On This Template option.
- Click OK.
If the style doesn’t show up, display the Styles pane, select the style, and choose Add To Quick Gallery. Once you move a style to the top of the list, you can select text and click the style in the Quick Gallery–a quick one-click solution to assigning styles.
Tuesday, March 29, 2011
Restoring the Sound Icon to the Windows 7 Task Pane
By Denny Whipple
If you use Windows 7 and you find that you can no longer see the sound icon in your system tray, here's a quick way to fix the problem. First, though, probably the system policies have been changed on your machine. Who cares? You just want the damn icon back so you can adjust the volume. There are a ton of registry modifications that you can go through but if you're not interested in going this risky route, then simply go to this link (Download RestoreMyTrayIconsPlease Registry Hack) and download the file. Unzip it and run it. Log off and log back in to Windows and your sound icon will be replaced.
If you use Windows 7 and you find that you can no longer see the sound icon in your system tray, here's a quick way to fix the problem. First, though, probably the system policies have been changed on your machine. Who cares? You just want the damn icon back so you can adjust the volume. There are a ton of registry modifications that you can go through but if you're not interested in going this risky route, then simply go to this link (Download RestoreMyTrayIconsPlease Registry Hack) and download the file. Unzip it and run it. Log off and log back in to Windows and your sound icon will be replaced.
Friday, March 18, 2011
Create an Etch‐a‐Sketch Drawing in Photoshop
Find a picture of an etch‐a‐sketch. Google Etch a Sketch.
Open an image that you want to have in the Etch‐A‐Sketch. I’ve used a raccoon image.
Remove the background of the image using any method (selection, erase, etc).
Then use Levels to darken the image slightly. Access Levels by Control‐L or Image/Adjustments/Levels.
Then desaturate (Control‐Shift‐U).
Then choose Filter>Sketch>Graphics Pen.
You can experiment with the settings but these seem to work best.
Then select all (Control‐A) and copy (Control‐C).
Go to the Etch‐A‐Sketch image and paste.
Use Free Transform (Control‐T) to resize the image and position it over the Etch‐A‐Sketch layer.
Now, change the blending mode of the top layer to Linear Burn. That’s it!
Open an image that you want to have in the Etch‐A‐Sketch. I’ve used a raccoon image.
Remove the background of the image using any method (selection, erase, etc).
Then use Levels to darken the image slightly. Access Levels by Control‐L or Image/Adjustments/Levels.
Then desaturate (Control‐Shift‐U).
Then choose Filter>Sketch>Graphics Pen.
You can experiment with the settings but these seem to work best.
Then select all (Control‐A) and copy (Control‐C).
Go to the Etch‐A‐Sketch image and paste.
Use Free Transform (Control‐T) to resize the image and position it over the Etch‐A‐Sketch layer.
Now, change the blending mode of the top layer to Linear Burn. That’s it!
Sunday, March 13, 2011
Problems with Gmail security in Chrome
by Denny Whipple
A couple days ago I noticed that when using the Google Chrome browser and accessing my gmail account, there was a red slash through the https: portion of the address in the address bar. My email account was not secured and after doing some research online, I determined that the problem was being caused by an extension that was installed in Chrome. The article that I read said the problem was being caused by an extention in Chrome called fastestchrome. I checked my extensions and I didn't have that particular extension installed but I did have one called the GamePlayLab plugin. I disabled this and whoopdedoo, gmail is now encrypted in Chrome.
This is how to check your extensions and then disable extensions in Chrome. Go to the wrench icon on the right side of the address bar at the top of the browser window. Click it and then choose Tools and then choose Extensions. When you click Extensions the browser will open a window that shows the extensions you have installed. If you don't see the two extensions that I mentioned earlier in this article, you'll have to experiment by disabling one extension at a time and checking gmail until you get the right one disabled. When you get the correct one disabled gmail will now be encrypicted again in Chrome.
This problem only happened to me in Chrome and not IE or Opera. It's something that Google needs to address but at least you can use this method to get gmail encrypted again.
A couple days ago I noticed that when using the Google Chrome browser and accessing my gmail account, there was a red slash through the https: portion of the address in the address bar. My email account was not secured and after doing some research online, I determined that the problem was being caused by an extension that was installed in Chrome. The article that I read said the problem was being caused by an extention in Chrome called fastestchrome. I checked my extensions and I didn't have that particular extension installed but I did have one called the GamePlayLab plugin. I disabled this and whoopdedoo, gmail is now encrypted in Chrome.
This is how to check your extensions and then disable extensions in Chrome. Go to the wrench icon on the right side of the address bar at the top of the browser window. Click it and then choose Tools and then choose Extensions. When you click Extensions the browser will open a window that shows the extensions you have installed. If you don't see the two extensions that I mentioned earlier in this article, you'll have to experiment by disabling one extension at a time and checking gmail until you get the right one disabled. When you get the correct one disabled gmail will now be encrypicted again in Chrome.
This problem only happened to me in Chrome and not IE or Opera. It's something that Google needs to address but at least you can use this method to get gmail encrypted again.
Saturday, March 12, 2011
Backgrounds in web design: Going from PSD to code
By Ryan Boudreaux
In my previous post entitled “Backgrounds in Web Design: Creating a theme.” I illustrated the process of creating a layout using Photoshop to build backgrounds with various elements including buttons, images, textures, layers, text, colors, and placement. In this segment I will demonstrate taking the PSD file and converting it for display in HTML using CSS style coding.
All files referenced in this post are available in the download, “Website design from PSD to Code.”
The companion gallery, “Creating a website from Photoshop to CSS code,” contains the full-size images.
First, let’s open up the PSD file in the download, shown in Figure A. (You will have to download the file and unzip to access all of the files.)
Remember, you want to organize your layout in such a way that you can put them into defined divisions in rows, columns, blocks, or tiles so that they can be rendered in coding. The text and images in the PSD layout are added on top of the background layers and can be placed easily with styling code. It is the background elements that will need to be sliced, and before making the slices, I will copy the Body Background layer wood grain and save it as a separate gif file named WoodGrainBg.gif. All the images and slices are included in the download.
Building the code
For the code we will insert some divisions for the header, body and footer sections along with two columns inside the main section. To do this, we will create a set of division <div> tags along with several elements in an HTML document and then add some CSS to lay down the styling and placement.
The initial HTML is shown here in Snippet 1 and the file can be found in the download as InitialPage.html:
Snippet 1
Snippet 2
/*CSS Styles */
body {
background-color:#EBEBEB;
}
#header {
border:1px solid red;
}
#footer {
border:1px solid red;
}
.container {
width:1000px;
margin:0 auto;
border:1px solid red;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
Starting out, I want to display the foundation of the layout with simple divisions separating the header, main content, and footer from the body. Everything is contained within the <div id=main> starting with the <div class=container> which is set to 1000px width, and this includes the three primary content areas <div id=header>, <div id=main_content>, and <div id=footer>. As you can see in the CSS, the body background layer is set to a light gray. I’ve added a 1px red border just for sake of visualizing the elements as displayed in Figure I:
Now that we have the basic layout shapes with the primary elements in place, it is time to add some style with the images we sliced in our previous steps, adding in the body background image, the header, main content body, and footer image slices. Now I am going to add in more styling code and remove the red border within the CSS, as shown below in Snippet 3.
Snippet 3
The food collage background image FoodImages.gif and the soup image Soup.gif will be contained within their own divisions named #headImage, and #footImage respectively. And because these images will be aligned above and overlap several other divs they will be assigned a z-index number of 2, and all the other div elements will be assigned z-index of 1. The higher number z-index assigned to an element will render it above all the lower-assigned numbers, so that any element assigned a higher numbered z-index will always be above the lower numbered elements. This allows us to layer several div elements that may overlap within the document.
The CSS for the <div id=headImage> and the <div id=footImage> is shown in Snippet 4.
Snippet 4
#headImage {
background-image:url(images/FoodImages.gif);
background-repeat:no-repeat;
width:495px;
height:460px;
position: absolute;
z-index: 2;
float:left;
margin-left:-250px;
margin-top:45px;
}
#footImage {
background-image:url(images/Soup.gif);
background-repeat:no-repeat;
width:475px;
height:185px;
position: absolute;
z-index: 2;
float:right;
margin-top:90px;
Note in both the #headImage and #footImage CSS that the z-index: 2 are set, the positions are absolute, and width and height are also defined. The margin settings shift the images in placement within the container, and these can be adjusted depending on desired placement.
The full CSS updates are shown in Snippet 5 and found in the download file as ImagesAddedStyle.css.
Snippet 5
body {
background-color:#EBEBEB;
overflow-y: auto;
overflow-x: auto;
margin: 0;
padding: 0;
}
#main {
background: url(images/WoodGrainBg.gif);
background-repeat:repeat;
overflow-y: auto;
overflow-x: auto;
z-index: 1;
}
#main .container {
overflow:visible;
}
#main_content {
background: url(images/Body.gif) top center repeat-y;
margin:0px auto;
float:right;
width: 1000px;
color: #403116;
font-size: 1.2em;
overflow:hidden;
z-index: 1;
}
#contentText {
margin: 0 20 10 200;
padding-left:170px;
padding-right:30px;
}
#header {
background:url(images/Header.gif);
background-repeat:no-repeat;
background-position:center;
overflow:auto;
padding-bottom:240px;
color:#030303;
z-index: 1;
font-size: 1.2em;
}
#footer {
background-image:url(images/Footer.gif);
background-repeat:no-repeat;
background-position:center;
margin: 0 auto;
color:#030303;
padding-bottom:160px;
padding-left:35px;
z-index: 1;
overflow:auto;
font-size: 1.2em;
max-height:300px;
}
#footer .leftContainer {
width: 450px;
float:left;
text-align:left;
position:relative;
padding-right:20px;
}
#footer .rightContainer {
width: 475px;
float:right;
text-align:left;
position:relative;
padding-right:10px;
}
.container {
width:1000px;
margin:0 auto;
position:relative;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
/* Images CSS styles */
#headImage h1, #headImage small {
margin:0px;
display:block;
text-indent:-9999px;
}
#headImage {
background-image:url(images/FoodImages.gif);
background-repeat:no-repeat;
width:495px;
height:460px;
position: absolute;
z-index: 2;
float:left;
margin-left:-250px;
margin-top:45px;
}
#footImage {
background-image:url(images/Soup.gif);
background-repeat:no-repeat;
width:475px;
height:185px;
position: absolute;
z-index: 2;
float:right;
margin-top:90px;
}
Note the following:
In my previous post entitled “Backgrounds in Web Design: Creating a theme.” I illustrated the process of creating a layout using Photoshop to build backgrounds with various elements including buttons, images, textures, layers, text, colors, and placement. In this segment I will demonstrate taking the PSD file and converting it for display in HTML using CSS style coding.
All files referenced in this post are available in the download, “Website design from PSD to Code.”
The companion gallery, “Creating a website from Photoshop to CSS code,” contains the full-size images.
First, let’s open up the PSD file in the download, shown in Figure A. (You will have to download the file and unzip to access all of the files.)
Figure A |
In Photoshop we will make several slices of the main content background section starting with separating the header section from the body, and then the footer section. The body background will be a separate division and we will eventually create divisions with <div> tags in the coding to piece it all back together.
Remember, you want to organize your layout in such a way that you can put them into defined divisions in rows, columns, blocks, or tiles so that they can be rendered in coding. The text and images in the PSD layout are added on top of the background layers and can be placed easily with styling code. It is the background elements that will need to be sliced, and before making the slices, I will copy the Body Background layer wood grain and save it as a separate gif file named WoodGrainBg.gif. All the images and slices are included in the download.
Making slices
First, turn off all the other layers in the PSD file with the exception of the Content Background layer, all the Button X layers, and the Text layers that name all the buttons. Keep them visible and active as shown in the Layers dialog box in Figure B.
Figure B |
Then select the Slice Tool as shown in Figure C.
Figure C |
Then, using the Slice Tool, draw a box shape over the header area, then another box for the main body content area, and then one more for the footer area, as shown in Figure D.
Figure D |
Now, select the Slice Select Tool as shown in Figure E.
Figure E |
When you double-click over the first slice for the header, a dialog box opens as shown in Figure F.
Figure F |
Add the name for the slice, in this case Header. Once the three slices are named, save the file by going to the menu path File | Save For Web | Save, or (Alt+Shift_Ctrl_S). All the slices will be saved as separate images as shown in Figure G.
Figure G |
Since the food images overlap somewhat with the header and body backgrounds, we need to make that slice separate. Next ,we will hide those active layers and make the food image collage at the top left of the header and body sections visible, therefore creating a fourth slice for that section, as shown in Figure H.
Figure H |
Then we will name and save the slice as we did in the steps for the first three above. I named this slice Food Images. We now have four slices that will be used to build our main sections of the header, body, and footer portions of the layout.
Building the code
The initial HTML is shown here in Snippet 1 and the file can be found in the download as InitialPage.html:
<div id=main>
<div class=container>
<div id=header>
<p>Header Stuff Goes in Here</p>
</div>
<div id=main_content>
<div id=left_sidebar>
<p>Left Column </p>
</div>
<div id=right_column>
<p>Right Column</p>
</div>
</div>
<div id=footer class=container>
<p>Footer Stuff Goes in Here </p>
</div>
</div>
</div>
<div class=container>
<div id=header>
<p>Header Stuff Goes in Here</p>
</div>
<div id=main_content>
<div id=left_sidebar>
<p>Left Column </p>
</div>
<div id=right_column>
<p>Right Column</p>
</div>
</div>
<div id=footer class=container>
<p>Footer Stuff Goes in Here </p>
</div>
</div>
</div>
The initial CSS is shown in Snippet 2 and is available in the download as the file style.css:
/*CSS Styles */
body {
background-color:#EBEBEB;
}
#header {
border:1px solid red;
}
#footer {
border:1px solid red;
}
.container {
width:1000px;
margin:0 auto;
border:1px solid red;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
Starting out, I want to display the foundation of the layout with simple divisions separating the header, main content, and footer from the body. Everything is contained within the <div id=main> starting with the <div class=container> which is set to 1000px width, and this includes the three primary content areas <div id=header>, <div id=main_content>, and <div id=footer>. As you can see in the CSS, the body background layer is set to a light gray. I’ve added a 1px red border just for sake of visualizing the elements as displayed in Figure I:
Figure I |
Adding the background image slices
Snippet 3
body {
background-color:#EBEBEB;
overflow-y: auto;
overflow-x: auto;
margin: 0;
padding: 0;
}
#main {
background: url(images/WoodGrainBg.gif);
background-repeat:repeat;
overflow-y: auto;
overflow-x: auto;
}
#main .container {
overflow:hidden;
}
#main_content {
background: url(images/Body.gif) top center repeat-y;
margin:0px auto;
float:right;
width: 1000px;
color: #403116;
overflow:hidden;
}
#header {
background:url(images/Header.gif);
background-repeat:no-repeat;
background-position:center;
overflow:hidden;
padding-bottom:185px;
color:#030303;
}
#footer {
background-image:url(images/Footer.gif);
background-repeat:no-repeat;
background-position:center;
margin:auto;
color:#030303;
overflow:auto;
padding-bottom:235px;
}
.container {
width:1000px;
margin:0 auto;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
background-color:#EBEBEB;
overflow-y: auto;
overflow-x: auto;
margin: 0;
padding: 0;
}
#main {
background: url(images/WoodGrainBg.gif);
background-repeat:repeat;
overflow-y: auto;
overflow-x: auto;
}
#main .container {
overflow:hidden;
}
#main_content {
background: url(images/Body.gif) top center repeat-y;
margin:0px auto;
float:right;
width: 1000px;
color: #403116;
overflow:hidden;
}
#header {
background:url(images/Header.gif);
background-repeat:no-repeat;
background-position:center;
overflow:hidden;
padding-bottom:185px;
color:#030303;
}
#footer {
background-image:url(images/Footer.gif);
background-repeat:no-repeat;
background-position:center;
margin:auto;
color:#030303;
overflow:auto;
padding-bottom:235px;
}
.container {
width:1000px;
margin:0 auto;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
A few notes on the CSS coding update:
- I’ve set the body overflow y and x to auto and given the margin and padding a setting of 0 each, this is to set the align the page in all browser versions.
- The main background image WoodGrainGb.gif is set to repeat with auto overflow y and x. so that in any screen resolution or browser window the wood grain background will cover the entire viewing area.
- The #main. container element is set to an overflow of hidden; this is to allow the food collage image div element to layer above the other div elements.
- The #main_content body.gif background image is set to repeat vertically and centered with a margin of 0px, and auto.
Figure J |
Adding the remaining images
The CSS for the <div id=headImage> and the <div id=footImage> is shown in Snippet 4.
Snippet 4
background-image:url(images/FoodImages.gif);
background-repeat:no-repeat;
width:495px;
height:460px;
position: absolute;
z-index: 2;
float:left;
margin-left:-250px;
margin-top:45px;
}
#footImage {
background-image:url(images/Soup.gif);
background-repeat:no-repeat;
width:475px;
height:185px;
position: absolute;
z-index: 2;
float:right;
margin-top:90px;
Note in both the #headImage and #footImage CSS that the z-index: 2 are set, the positions are absolute, and width and height are also defined. The margin settings shift the images in placement within the container, and these can be adjusted depending on desired placement.
The full CSS updates are shown in Snippet 5 and found in the download file as ImagesAddedStyle.css.
background-color:#EBEBEB;
overflow-y: auto;
overflow-x: auto;
margin: 0;
padding: 0;
}
#main {
background: url(images/WoodGrainBg.gif);
background-repeat:repeat;
overflow-y: auto;
overflow-x: auto;
z-index: 1;
}
#main .container {
overflow:visible;
}
#main_content {
background: url(images/Body.gif) top center repeat-y;
margin:0px auto;
float:right;
width: 1000px;
color: #403116;
font-size: 1.2em;
overflow:hidden;
z-index: 1;
}
#contentText {
margin: 0 20 10 200;
padding-left:170px;
padding-right:30px;
}
#header {
background:url(images/Header.gif);
background-repeat:no-repeat;
background-position:center;
overflow:auto;
padding-bottom:240px;
color:#030303;
z-index: 1;
font-size: 1.2em;
}
#footer {
background-image:url(images/Footer.gif);
background-repeat:no-repeat;
background-position:center;
margin: 0 auto;
color:#030303;
padding-bottom:160px;
padding-left:35px;
z-index: 1;
overflow:auto;
font-size: 1.2em;
max-height:300px;
}
#footer .leftContainer {
width: 450px;
float:left;
text-align:left;
position:relative;
padding-right:20px;
}
#footer .rightContainer {
width: 475px;
float:right;
text-align:left;
position:relative;
padding-right:10px;
}
.container {
width:1000px;
margin:0 auto;
position:relative;
}
#right_column {
margin-top:10px;
float:right;
top:0;
right:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:5px;
padding-right:20px;
}
#left_sidebar {
margin-top:10px;
float:left;
top:0;
left:0;
width:475px;
min-height:600px;
overflow:auto;
padding-left:20px;
padding-right:5px;
}
/* Images CSS styles */
#headImage h1, #headImage small {
margin:0px;
display:block;
text-indent:-9999px;
}
#headImage {
background-image:url(images/FoodImages.gif);
background-repeat:no-repeat;
width:495px;
height:460px;
position: absolute;
z-index: 2;
float:left;
margin-left:-250px;
margin-top:45px;
}
#footImage {
background-image:url(images/Soup.gif);
background-repeat:no-repeat;
width:475px;
height:185px;
position: absolute;
z-index: 2;
float:right;
margin-top:90px;
}
Note the following:
- z-index 1 setting has been added to the #main, #main_content, #header, and #footer style elements.
- #footer .leftContainer, and #footer .rightContainer styling has been added so that the footer image and text can be aligned and separated within the footer.
- #headImage h1, #headImage small allows an <h1> and a <small> text within the header image, with the text-indent set to -9999px. This helps with SEO keywords without having to render the text on screen
I have added several paragraphs <p> of Lorem ipsum filler text within the main content, left sidebar, right sidebar, and left footer divs to help with visualizing the full layout with text and images. You can view the layout with images rendered in Firefox as shown in Figure K and the HTML is found in the download file ImagesAddedPage.html.
Figure K |
Subscribe to:
Posts (Atom)