Thursday, July 17, 2008

Div Container Width

I have become a great fan of CSS and fluid design for the past couple of years. Tables are a thing of the past. The problem is that even though most Web designers have evolved, browsers have not.

You see browsers are put together by coders, developers if you will. Those types only understand 0 and 1s and have very little time to worry about nuances that pesky designers would devote their time to calculating. One of those nuances are containers like div.

Originally designed to serve as layers, again for Web and Graphic designers, div have become very useful as not only can they float and be positioned, but they serve as containers for content on the Web page.

Here comes my issue, I been having some problem fitting the content on a multi-column site. After some quick Googling, I came across a forum thread explaining that the total outside width of a div box is the sum of the values for the following properties:

margin-left
+ border-left-width
+ padding-left
+ width
+ padding-right
+ border-right-width
+ margin-right
= total occupied width of any {display:block} type box

This makes no sense to me. Although Firefox does follow standards and many accuse Internet Explorer of breaking rules and misbehaving; IE6 and IE7 follow rules much more closely to how designers work. When I designed a page I typically render it in Photoshop, then I translate the work into HTML and CSS. When I measure my drawings in Photoshop, IE follows suit, while I have to more intensely calculate when it comes to Firefox.

The bottom line is that it is unfortunate that browser creators can't come together and be unified so that we, as Web designers, don't have to patch holes cause by the multitude of browsers. Perhaps one day the W3C will succeed in unifying browsers with coming up with standards and rules. As for me, I'm just waiting for Google to come out with their own browser, take over the world, and keep making us drink their cool-aid, until then, I'll keep plugging the holes and hope to stay afloat.

Labels: , , , , , ,

Digg This Del.icio.us Slashdot

Saturday, May 31, 2008

Embed fonts on your Web site

Recently, I have been thinking about design and the nature to code safely on the Web. As designers we typically choose to use Web friendly fonts like Verdana, Times New Roman, Arial, and Trebuchet MS.

Designers, however should not let browsers inabilities to carry a vast array of fonts interfere with their designs. Michaelangelo would not have sacrifice the roof of the Sistine Chapel due to lack of a smaller brush, so why is it that Web designers so often sacrifice bandwidth and turn to background images or heavy downloads to convey their message; not to mention the lack of search engine friendliness involved in presenting picures and images instead of text.

I sought out a clear answer on how to embed fonts on a site without the need to sacrife speed or SEO. Back in the late 90's both Netscape and Internet Explorer were fighting grounds for the title of browser reign supreme as such both came out with unusual plugins and font rendering programs, however this was but a mere patch and band aid on the problem as fonts were translated to images solving only the small side of the equation. I don't blame them as SEO wasn't a hot topic in those days and Google was but a silly word some guys thought of to represent their brand.

In today's Web, where Search Engines are the hot club were your name must be on the list, it is crucial to create SE's friendly sites. to do so, the @font-face construct must be utilize.

Here is a simple example courtesy of the css czars at A List Apart:

@font-face {
font-family: "Kimberley";
src: url(http://www.princexml.com/fonts/larabie/ »
kimberle.ttf) format("truetype");
}
h1 { font-family: "Kimberley", sans-serif }

"Those familiar with CSS syntax will recognize the last line. The @font-face construct may not be familiar, however it’s easy to explain: as the “Kimberley” font is requested, the font file is fetched from the specified URL. The syntax is described in the CSS2 specification.

To avoid long lists of @font-face declarations in the style sheet, they can be hidden using @import" like so,

@import url(http://www.princexml.com/fonts/larabie/index.css) all;
h1 { font-family: Goodfish, serif }

The bottom line is that you should not limit yourself or set the bar too low, there is always a way to solve the problem. Problems are easy to come by, but securing an answer is where the intellectual matter comes into play. Don't let the ineptitude of todays' browser interfere with the future, just make sure that you gracefully prepare your site for degredation or for those living in the past. To appreciate the true power behind css, please refer to the Zen Garden project.

Labels: , , , , , , , , ,

Digg This Del.icio.us Slashdot

Sunday, March 16, 2008

Dreamweaver Max CPU Bug

Recently I formatted my laptop because I thought I caught a virus. I'm very careful, I had Symantec Antivirus and Microsoft AntiSpyware installed, yet my computer seemed to start crawling after a few minutes of working. Since I work on the Web, I typically have Dreamweaver, Photoshop, and Outlook running all the time, with 2Gb of RAM, I figured I should be able to do so without much problem.

I reformatted and things seemed better, until recently when my computer went back to timing out for about 30 seconds every time I'm coding in Dreamweaver. I opened the task manager and shut down every program but Dreamweaver. I noticed that my CPU was maxed out at 100% and yet no other process was taking CPU time. It then back down to 1% and then back to 50%, 60% etc, without me doing anything.

I did some quick googling to find out that Dreamweaver has a nasty bug in it that is yet to be addressed, let alone fixed, by Adobe. It seems that if you stay connected to a site after a while the ftp functionality takes over by sending packets out and maintain the connection. The temporary, band-aid, fix is to disconnect from the site and only connect when needed.

The bottom line is that Adobe, the most respected company in Web and Graphic Design, ought to address this issue or at the bare minimum inform register users of the bugs so that they don't waste valuable billable time chasing down their errors.

Labels: , , , , ,

Digg This Del.icio.us Slashdot

posted by Death is Forever at 0 Comments Links to this post