BLOG DESIGN SOLUTIONS (Remote web server) While we re at it, add
Friday, November 30th, 2007BLOG DESIGN SOLUTIONS While we re at it, add some padding to the #content: #content{ background-image:url(../images/stretchy-middle.gif); background-repeat: no-repeat; _height:512px; min-height: 512px; padding-left:155px; padding-right: 80px; } A look at the site now should reveal what looks like an almost complete design. You might be wondering which advanced mathematical formulas I used to get px values for padding-left and padding-right. The truth is that I used no formulas; it was simply a case of trial and error until it looked right. No golden ratios here, no sir. That rogue white space We spoke earlier about the rogue white space that is separating the head image and the middle image. Now is the time to tackle it. Fear not, we ll be coming back for the unsightly search box and the browse menu a little later. Just to demonstrate how strange this white space problem is, do this: add border: 1px solid red; to the CSS for #content just as you did when we first started the layout, and you will see it cures the problem. Okay, remove the border; it s not going to help us, unfortunately. I went about curing this by logical trial and error and found that adding padding-top:1px; to both the #content and #sidebar-2 CSS fixed the problem: #content{ background-image:url(../images/stretchy-middle.gif); background-repeat: no-repeat; /*height:512px;*/ min-height:512px; padding-left:155px; padding-right: 80px; padding-top:1px; } #sidebar-2{ background-image:url(../images/stretchy-head.gif); height:160px; padding-top:1px; } Great news but why did that work? Finding out why strange CSS stuff happens is why the web standards community is invaluable; I sent a few e-mails to my fellow CSS designers, and Mike Stenhouse (http://donotremove.co.uk/) sent back a mail pointing out that it was the margins from the
escaping the #content
that were causing the space problem. Never satis
TEXTPATTERN For a more detailed look at the (Web hosting asp)
Thursday, November 29th, 2007TEXTPATTERN For a more detailed look at the underscore hack, visit http://wellstyled.com/ css-underscore-hack.html. We are making good progress. The next two issues to deal with are the obvious lack of a background that joins up the design s head and foot no matter how long the blog post is and the fact that the text itself is too wide for the design. To fix both of these problems we ll use that extra
BLOG DESIGN SOLUTIONS Allowing for content length The (Hosting web)
Thursday, November 29th, 2007BLOG DESIGN SOLUTIONS Allowing for content length The first thing is to sort out the problem of the content overflowing the #content
TEXTPATTERN As shown in Figure (Frontpage web hosting) 6-31, all that
Wednesday, November 28th, 2007TEXTPATTERN As shown in Figure 6-31, all that extra text is overlapping the links at the bottom of the site (unless you happen to be looking in Internet Explorer (IE) on Windows, in which case the result will be slightly different but still a royal mess that needs sorting out). 6 Figure 6-31. The site s a bit of a mess just now Why a browser with good CSS support is important It s at this point that we realize we ve run in to real trouble. It s also at this point that we need a browser we can be fairly sure is playing nicely with the W3C specs in this case the CSS 2.1 specs (www.w3.org/TR/CSS21). So we must abandon our beloved IE for now because its support for these specs is patchy, to say the least. We ll come back to the troublesome browsers only after we sort out the genuine problems. It s only by doing things this way that we can avoid RHI (Repetitive Head Injury). If you wonder which browsers are good and which are not so good (or are surprised to learn that there are other browsers possibly better than IE), then pop over to http:// browsehappy.com and get the details. 249
BLOG DESIGN SOLUTIONS What is immediately (Florida web design) apparent is
Tuesday, November 27th, 2007BLOG DESIGN SOLUTIONS What is immediately apparent is that Textile is easier and quicker to write. Paragraphs are created in much the same way as they are in word processing software by pressing Enter twice and there is no hassle remembering to close tags. Textile takes care of all that for you. To the left of the post is a link titled Textile Help that lists commonly used Textile mark-up, whereas the More link at the bottom of the list takes you off to the main Textile website (http://textism.com/tools/textile) to receive a more in-depth look at the mark-up. Of course, you can use XHTML to make posts if you want: simply change the drop-down menu under Advanced Option from Use Textile to Leave text untouched. Adding some extra content Armed with this knowledge of Textile, we can easily extend First Post to include more paragraphs. Simply copy and paste the first paragraph four times, ensuring that you press Enter twice between each paste. As ever, remember to press Save on the right of the post. Figure 6-30 shows the process. Figure 6-30. Adding more text to the site
TEXTPATTERN #sidebar-2{ background-image:url(../images/stretchy-head.gif); height:160px; } Rogue white space (Web site designers)
Monday, November 26th, 2007TEXTPATTERN #sidebar-2{ background-image:url(../images/stretchy-head.gif); height:160px; } Rogue white space and other undesirable behavior Look at the design and notice that there is an undesirable gap between the head and the middle images. And the text doesn t fit within the confines of the design. Now might seem like the time to start worrying about it, but don t worry yet because there are bigger issues we have to deal with first. I just wanted to flag the problems now so that if you are fol lowing along step by step you know that it s fine to carry on. We ll fix these issues in due course. A first look at a blog post If all our blog posts were going to be exactly the same length as First Post, our work here would be simple. But you and I know that this won t be the case: websites need to stretch, at the very least, vertically. So, to highlight yet another problem that needs fixing, the contents of that First Post need to be extended (although we are bound to get a little distracted by some TxP features along the way). Pop along to Content . Articles and click on the words First Post. The post will open in the write tab. Notice that there is no HTML in this post and for good reason. Click the Advanced Options link to the left of the text area. You ll see the title Use Textile and under that the heading article and a drop-down menu that by default contains the words Use Textile. A brief look at Textile First off, what is Textile? In short it s an easy way to write XHTML for people who don t normally trouble themselves with such things. Let me show you a quick example: In XHTML we might write this:
My level 1 heading
My first paragraph
My second paragraph
Written in Textile that would look like this: h1. My level 1 heading My first paragraph My second paragraph 247
BLOG DESIGN SOLUTIONS to this: #content{ border:1px solid (Web hosting mysql)
Monday, November 26th, 2007BLOG DESIGN SOLUTIONS to this: #content{ border:1px solid green; background-image:url(../images/stretchy-middle.gif); } Finally add the foot image, remembering to press Save at the bottom of the page when you re done. #sidebar-1{ border:1px solid red; background-image:url(../images/stretchy-foot.gif); } More thoughts on semantics This is a good time to return to our discussion on semantics and
TEXTPATTERN Figure 6-29. Placing the image slices in (Medical web site)
Sunday, November 25th, 2007TEXTPATTERN Figure 6-29. Placing the image slices in the web server s images directory If you really do want to use TxP s image upload tool, you ll simply need to make a note of the number TxP gives the image and then use it accordingly in the CSS. Adding the image slices to the design The colored borders we added to the three
BLOG DESIGN SOLUTIONS To get the values of
Saturday, November 24th, 2007BLOG DESIGN SOLUTIONS To get the values of these colors, load them into Fireworks by opening the swatches window via Windows . Swatches. Choose Replace Swatches, which is reached via the small menu icon located at the top right of this window, as shown in Figure 6-28. Figure 6-28. Loading color values From here you can navigate to the .act file you created and load up your colors. Then draw a rectangle on a blank canvas and pick off the colors from your swatch to get the hex values, which can then be copied and pasted directly in your CSS file when you want to add color. Uploading the image slices There are two ways to load the image slices onto the server to be ready for use: place them manually into the images directory or use TxP s built-in image upload tool, located under Content . Images. The problem with doing it via TxP s built-in image upload tool is that TxP will rename the image, giving it a numeric value. So although it is possible to add it via TxP, in this case it is probably easier and quicker to just export the image slices directly from the graphics editor into the images directory at the root of the server, or copying and pasting them there. That is exactly what I have done for this example, as shown in Figure 6-29.
These images are available in the code download (Graphic web design)
Saturday, November 24th, 2007These images are available in the code download for this chapter on www.friendsofed.com (the filenames are stretchy-head.gif, stretchy-middle.gif, and stretchy-foot.gif). Creating a color swatch We will need some color to liven up our text, and one way to get colors is to extract them from the main image used throughout the design. I use Macromedia Fireworks to create color swatches for this very purpose, but if you use Photoshop you can read Andy Clarke s writeup at www.stuffandnonsense.co.uk/archives/arrangement_de_couleurs.html and get much the same effect. To do this in Fireworks is really very simple. Open up the image you ll use in Fireworks (in this case, our cartoon) and choose File . Image Preview in Fireworks 8 or File . Export Preview in earlier versions. Make sure that the format is GIF and look for the arrow at the top right of the format menu. Here you will find the Save Palette function. When prompted, save to somewhere convenient as mycolours.act (or any name you can remember). Press Cancel in the image preview to take you back to the main Fireworks canvas. Figure 6-27 shows this process. Figure 6-27. Saving a color swatch in Fireworks 8 TEXTPATTERN 243