Monday, November 15, 2010

Weave that Dream! --Where to from here?

Practice Practice Practice

I have updated the SEO page, It's about Search Engine Optimization...

http://uofgts.com/dream/SEO.html

Things to consider

Don't be afraid to experiment. 
Start on  a "blank" web page.

Use your favorite search engine to find an answer or a tutorial on the subject with which you are experimenting...

Join a Forum and Lurk

http://groups.google.com/group/webweavers?pli=1

http://tech.groups.yahoo.com/group/adobe-dreamweaver/

http://kb2.adobe.com/cps/142/tn_14240.html

http://forums.adobe.com/community/dreamweaver

 

Watch  AdobeTV

http://tv.adobe.com/channel/web/

 

Reference Books

Dreamweaver the Missing Manual

http://search.oreilly.com/?q=dreamweaver

 

Or, just send me an e-mail!

Practice Practice Practice

 

 

 

 

 

Thursday, November 11, 2010

Using CSS in Dreamweaver to Center Image on a web page

Here are 3 methods for centering images or any element, id or class...

(This also works for any html element, id, or class)

The problem

You want to place a "box" and an image on a web page. AND, you want them centered.

 

Method #1: Absolute, Auto and 0 (zero)

(Click on the image to see the web page)

SOLUTION

Make the Box and the image have the property, position and value, absolute; and Set the margin: auto; but set the Top, Right, Bottom and Left positions to 0 (zero). Source Below!

<style type="text/css">
body {text-align: center;
margin: 0 auto;
}

#largebox {

text-align: left;
width:500px;
height:400px;
background-color:#407751;
border:dotted #000000 1px ;
position: absolute;
margin: auto;
left:0; right:0;
top:0; bottom:0;
}

/* instead of making the image an id, you can target the image by using the descendant relationship #largebox img {} */

#smallimage {
background-color:#F00;
border:solid #fff 2px ;
position: absolute;
margin: auto;
left:0; right:0;
top:0; bottom:0;
}

</style>

</head>

<body>
<h2>Method 1: Absolute, Auto and 0 (zero)</h2>
<p style="text-align:left; text-indent:5em;">Make the Box and the image have the property and value position: absolute; and Use Margin: auto; but set the Top, Right, Bottom and Left positions to 0 (zero). Check out the embedded source!
</p>
<p>Check to see if this works in all browsers!</p>
<div id="largebox">
<img src="../imageproc/thumbsize/200pixels.jpg" alt="A thumbnail 200 pixels wide of MoultonFalls Moss" width="200" height="133" id="smallimage" />
</div>

</body>
</html>

As Always Check to see if this works in all browsers!

------------------------------------------------------------------------------------------------------------

Method #2: The 50% Solution

(Click on the image to see the actual page)

SOLUTION

For Absolute Position, set Top, Right, Bottom and Left to to 50% Percent

Subtract from margin-top, margin-right, margin-bottom and margin-left 1/2 (50%) of the width and height of the image in pixel units. Check out the source below!

<style type="text/css">

 

body {text-align: center;}
#largebox {
text-align: left;
width:500px;
height:400px;
background-color:#CFF;
border:dotted #000000 1px ;
position:absolute;

/* Apply the 50% rule */

left: 50%;
top: 50%;
right:50%;
bottom:50%;

/*Subtract 50% (1/2) the width and height of the image or element

the minus sigh moves the element to the left */
margin-left: -250px;
margin-top: -200px;
margin-right: -250px;
margin-bottom:-200px;

}
#smallimage {
background-color:#F00;
border:solid #000000 2px ;
position:absolute;
left: 50%;
top: 50%;
right:50%;
bottom:50%;
margin-left: -100px;
margin-top: -66px;
margin-right: -100px;
margin-bottom:-66px;

}

</style>
</head>

<body>
<h2>Method 2: The 50% Solution</h2><h3></h3> Using Absolute, 50% Percent and subtract 1/2 (50%) of the width and height of the image</h3>
<p style="text-align:left; text-indent:5em;">Make the Box and the image have the property and value position: absolute; set the Top, Right, Bottom and Left positions to 50% and subtract from margin-top, margin-right, margin-bottom and margin-left 1/2 (50%) of the width and height of the image in pixel units. Check out the embedded source!
</p>
<p>Check to see if this works in all browsers!</p>

<div id="largebox">
<img src="../imageproc/thumbsize/200pixels.jpg" alt="A thumbnail 200 pixels wide of MoultonFalls Moss" width="200" height="133" id="smallimage" />
</div>

</body>
</html>

--------------------------------------------------------------------------------

 

Method #3: Use Display: Block;

Click on the image to see the actual web page.

The Solution

Tricky... The key to centering an image on a web page is that by default an image is an inline element.

"Inline Elements always begin on the same line. Height, line-height and top and bottom margins can’t be changed. Width is as long as the text/image and can’t be manipulated!"

Unless you change the image to act like a block element using the Property and Value display:block;

You could put the image in a div, but why add a div when you don't need it? PLease report if the above works in your browsers!  Thanks. The source is below...

<style type="text/css">

body {text-align: center;

text-indent: 5em;
margin: 0 }

#largebox {
text-align: left;
width:500px;
height:400px;
background-color:#999288;
border:dotted #000000 1px;
margin: 0 auto;

}

#smallimage {background-color:#F00;
background-color:#CFF;
border:solid #fff 4px;
display: block;
margin: 120px auto ;

}

</style>
</head>

<body>
<h2>Centering an image using display: block;</h2>
<p style="text-align:left;">Tricky... The key to centering an image on a web page is that by default an image is an inline element. </p>
<blockquote style="text-align:left;"> <em><strong>"Inline Elements always begin on the same line. Height, line-height and top and bottom margins can’t be changed. Width is as long as the text/image and can’t be manipulated!"</strong></em></blockquote>
<p style="text-align:left;">Unless you change the image to act like a block element using the Property and Value <em><strong>display:block;</strong></em></p><p style="text-align:left;">You could put the image in a div, but why add a div when you don't need it?</p>

<div id="largebox">
<img src="../imageproc/thumbsize/200pixels.jpg" alt="A thumbnail 200 pixels wide of MoultonFalls Moss" width="200" height="133" id="smallimage" />

</div>

</body>
</html>

 

as always, have fun!

 

 

Thursday, November 4, 2010

Inserting Video with Dreamweaver

Taking advantage of HTML 5 Video

This is the source from Video 1 Inserting video the right way

Reference:  "Video For Everybody" v0.4.2 by Kroc Camen of Camen Design.

You'll note that this design does not need any script loading in the (header of the)  html document

<---- Snip

<!-- first we try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise       -->

<!-- warning: playback does not work on iPad/iPhone if you include the poster attribute! But it's fixed in iOS4.0  -->

 

<video width="320" height="240" controls>

<!-- MP4 must be first for iPad's to play the video! WebKit Browsers video codecs are listed first  -->

 

<source src="../videoreels/Sequence2.mp4"  type="video/mp4"  />

<source src="../videoreels/Sequence2.3gp"  type="video/3gp"  />

 

<!--  Next we list Non web kit browsers: like Firefox. You can convert to webm or Video ogg videos formats using a web site called Firefogg  You need to use Firefox as your browser to make this on-line service work as it is a plug-in for Firefox  http://firefogg.org/make/index.html# -->

<source src="../videoreels/Sequence2.ogg"  type="video/ogg"  />

<source src="../videoreels/Sequence2.webm" type="video/webm" />

 

<!-- This is the generic Firefox / Opera format used in the statements above

<source src="__VIDEO__.MP4" type="video/mp4" />

<source src="__VIDEO__.OGV" type="video/ogg" /> -->

<!-- If all else fails (all the above video players don't work) the fallback to use a Flash player -->

<!-- Here we're using a java based flash player JW Player http://www.longtailvideo.com/

you'll need to go to the longtailvideo site and download and install the jwplayer -->

<object width="320" height="240" type="application/x-shockwave-flash" data="../jwplayer/player.swf">

 

<!-- Firefox Flash uses the `data` attribute listed above, IE/Safari uses the 'param' listed below-->

<param name="movie" value="../jwplayer/player.swf" />

<param name="flashvars" value="controlbar=over&amp;image=../videoreels/Sequence2.jpg&amp;file=../videoreels/Sequence2.mp4" />

<!-- Add a fallback image. note the title field below, put the title of the video there -->

<img src="../Videoreels/Sequence2.jpg" width="320" height="240" alt="Shel visits ECC" title="Sequence2.mp4, No video playback capabilities, please download the video below" />

</object>

</video><br />

<!-- you *must* offer your client a download link as they may be able to play the file locally. You can customize this bit all you want -->

<p><strong>If you can't play the video on-line <br />You may Down Load it! :</strong><br />

Closed Video Format for non-profit use only:<a href="../videoreels/Sequence2.mp4">"MP4"</a><br />

Open Video Format anyone can use it:<a href="../videoreels/Sequence2.ogg">"Ogg"</a>

</p>

---->snip

That's all you need in terms of "Markup"

Most of the work will involve converting your existing video to all of the above codecs

Video 2  Adobe's HTML 5 Video Widget

If you don't have Adobe's Widget Browser Installed, do get it. You don't need Dreamweaver CS5  to run the Widget browser or use the generated code! All you need to install is the latest version of Adobe Air and the Widget Browser

This is just a snap shot of the code generated by the HTML5 Video Widget

html5video.jpg

 

When you save the widget files to a folder, all the necssary files and scipts are generated and saved...

Files Generated by HTML5 Widget

videowidgetfiles.jpg

In Dreamweaver CS5 it's way easier to just put your cursor where you want the video and insert it via the Insert panel:  > Common > Widget

Change the path to the videos and you are done.

 

3 Inserting Flash Media in Dreamweaver

You want to use one the above methods if you want all browsers and all smart devices to be able to play the video.

 

Enjoy and have Fun!

 

 

 

 

Making Columns --A Puzzle for you to solve...

Making Content Readable

The puzzle is simple... There is some text in a 'container' with the id = "content" The puzzle is to format the text into 3 columns. Why?

In the United States, a common newspaper columns measurement is about 11 picas wide (or about 1.83 inches), though this measure varies from paper to paper and in other countries. On a Computer screen the display is set at 96 pixels/inch, so 1.83 x 96 = 176 Pixels. The Physiology is that it is easier to read something and comprehend it if the reader doesn't have to move their eyes to read the article.

Click this link to download the Column Puzzle

ColumnPuzzle.jpg

Find a solution using CSS 2 and then check out Adobe's Widget Browser for a CSS3 solution!

As Aways, Have Fun!



Transparency using CSS in Dreamweaver

Learn something new everyday!

I didn't think it was possible to make background colors and images with varying degrees of transparency!

These two web pages explain how it's done.

From w3schools tutorials you can even use their "try-it-out feature!
Transparency/Opacity at w3schoolsScreen shot 2010-11-04 at 12.14.46 AM.jpg



and here's what's to come in CSS3

From the web site css.flepstudio.org

Okay! Have Fun!





Wednesday, November 3, 2010

Forms -- Class 5 review


Mail Forms

You'll find really good tools to make forms in Dreamweaver. You'll find excellent Extensions too.  You can even find terrific wizards or form generators on-line, like Accessify's  quick form builder.

But, none of them tell you how to implement the form without incurring a lot of spam, ensuring that the form is secure, and it actually works delivering to you usable information.

Except for Huggins' Free E-mail Form Script!

With this link you can download Huggins' script, sample forms and instructions Version2.2.3 Huggins%20Email%20Form%20Script

At first, the contents in the Huggins' folder might look intimidating and hard to install, but it isn't at all.  Just read the "manual" and follow the instructions.

If you go to the class web site's contact page, on that page you'll find a link that will download all the files that make the class form...

class contac page.jpg


Here's another example web page
that uses Huggins' E-mail Script and form. See if you can spot what's different about those forms!

For some tips and information about forms read the class about forms page

Tuesday, November 2, 2010

Free Video Converter --Offer Good until November 4

Do you want to insert video on your web pages?

You'll need to convert the video so that it will play on a smart phone, iphone, ipod, ipad, internet capable TV and a desktop computer!!!

WinX is offering a Free Converter until November 4
License Codes for Mac or Windows versions are on the download page
WinX HD Video Converter Deluxe
Note: No free update or technical support is provided.
http://www.winxdvd.com/giveaway/

In class this week we will learn how to insert the video and other media on your web pages