Bannières Création de bannières en direct, échange de bannières Graphique
Informatique Internet Loisirs Programation Recherche
Référencements
Sports
WEBMASTERS!
Jolywood |
DREAMWEAVER TUTORIALS Tag
Tips Hand Code If
You Want If you want to work in the HTML Inspector and save on mouse-clicks, the best way to open the HTML Inspector is to use Ctrl+Tab. This will open the HTML Inspector as the active window so that you can immediately type in it without having to change the focus first. You can also use this command to toggle between the HTML Inspector and Document window. As you work in the HTML Inspector, you can click back to the Document window to see your changes. Alternatively, you can work in the Document window and see your changes immediately take effect in the HTML Inspector (without switching windows). Although several Wywiwyg editors now let you view the layout view and the source code simultaneously, Dreamweaver is one of the few that allows you to work in both at the same time. (It should be noted, however, that closing the HTML Inspector will improve the overall performance of Dreamweaver.) Use
a Code-Based Editor Dreamweaver 2.0 is bundled with HomeSite 4.0 for Windows or BBEdit 5.0 for Mac (except the educational, upgrade, and ESD versions). To work with one of these editors, simply launch the HTML Inspector and click the External Editor button. (You can also select Edit/Launch External Editor from the Document window, or use Alt+E, D.) If you haven't previously specified which external editor you want to use, the Preferences dialog box will appear. Make sure External Editors is highlighted in the left column, and then type or browse for the program you want to use. Click OK to launch the editor. The next time you launch an external editor, the code-based editor of your choice will open. Eradicate
Unnecessary Tags This feature is not an HTML validator by any means, but it lets you tighten up your code by eliminating such errors as a stray end tag. Choose Commands/Clean Up HTML from the menu bar. In the dialog box that appears, you have several options for cleaning up your HTML: Remove Empty
Tags Ponch was <I>way</I> cooler than Jon.<I></I> Remove Redundant
Nested Tags <I>Ponch was <I>way</I> cooler than Jon.</I> Remove Non-Dreamweaver
HTML Comments Remove Dreamweaver
HTML Comments Remove Specific
Tag(s) Combine Nested
<FONT> Tags When Possible But I had a crush on <FONT color="red"><FONT size="+1">Sgt. Getraer<FONT><FONT>! would be more lean and mean, like this: But I had a crush on <FONT color="red" size="+1">Sgt. Getraer<FONT>! When you've selected which options you want to use to clean up your HTML, you can decide if you want a notice of what was changed by selecting Show log on completion. You might like to know the number of empty tags you had in your document, for example, so you can watch out for those in the future. The log is not very informative, but JavaScript experts can open the file Clean Up HTML.js in a text editor (the default location is \Dreamweaver 2\Configuration\Commands\) and customize the report. Format Your Code With One Click Web builders can be picky about their source code. You know how you are--you must indent subsections four spaces instead of five. You lie awake at night thinking about how someone mixed their cases (gasp!). Neat code is a good habit to pick up and it usually saves you time later when you're looking for a specific piece of code. But if you share coding responsibilities with co-workers, you may find that not everyone shares your tidy coding habits. With Dreamweaver, you can now get a good night's rest even if some tags are capitalized and others are lowercase. Just use the Commands/Apply Source Formatting option to format the code exactly how you want it to look. But first you must define how you would like your code formatted. Select Edit/Preferences from the menu bar (Alt+E, S in Windows or Command+U for Mac), highlight HTML Format in the left column, and you'll see the wide variety of options you can specify: the size of indents, the case of tags and attributes, and more. Once you've chosen your personal formatting preferences, click OK. Now if someone was a little sloppy in their coding, you can just select Commands/Apply Source Formatting-your own formatting options will be applied to the existing code. Furthermore, every time you create a new document, your formatting techniques will already be in place. Ahh, no more sleepless nightsò. For
Advanced Web Builders Search
and Replace Globally The advanced search capabilities of Dreamweaver 2.0 will make experienced Web builders starry-eyed. You might even want to switch from other tools to Dreamweaver just for this powerful feature. You can launch the search-and-replace function from within the Document window using Edit/Replace (Alt+E, E for Windows or Command+H for Mac) or from within the HTML Inspector (right-click for Windows or Ctrl+click on the Mac, and then choose Replace for Windows from the pop-up menu). You'll be able to search the current document, the current site, or a selected folder. You can also launch this function from within the Site window (by using the same commands). From here, you'll be able to search selected files, the current site, or a selected folder. The site-wide option is not the only feature that makes the search-and-replace so impressive. You also have a lot of leeway as to what you can search for:
You also have the option of being case-sensitive in your search, ignoring whitespace differences, and using regular expressions. That's all there is to it. By choosing a few options in an easy-to-use dialog box, you have the most powerful search-and-replace feature to date in a Wysiwyg editor. Add
<BR> and Quickly When you want
a non-breaking space--one that keeps
the two words around it on the same line--who can remember that convoluted
character code? This tip will let you insert the As for vertical
space, sometimes a paragraph break is just too much space. For those
who know HTML, the line-break tag
is a lifesaver in these situations. To enter Graphics
Tips One of the most popular features on Web pages these days is mouseovers (or rollovers). You've seen them: You move your cursor over an image and it changes into a different image! A mouseover consists of two images--the image that you first see and the one that is loaded when you mouse over that image. Dreamweaver makes it really easy to create mouseovers if you know where to look. In the Document window, simply place your cursor where you want the original image to appear on your page. Then select Insert/Rollover Image. (You can also launch this box by clicking the Insert Rollover Image button on the Objects palette.) The Insert Rollover Image dialog box will appear, where you specify which two images you want to use. The Original Image field should be the image you want to appear on your page, and the Rollover Image field should be that one that pops up when the cursor moves over the original image. The mouseover won't be viewable within Dreamweaver, but you can easily test it by choosing File/Preview in Browser. When you move your mouse over the image, you should see the second image pop up. Creating mouseovers is as simple as that, but there are a few tricks that will make them truly effective. First, you should use images of the same size since the code that is inserted requires the same height and width regardless of the images' original sizes. Second, the Preload option (selected by default) will load both images into the browser's cache when the page loads so that you can prevent delays caused by downloading when the mouseover is fired. Set
a Default Image Editor To set your default image editor, select Edit/Preferences. In the Preferences dialog box, highlight External Editors in the left column, and either type or browse for your favorite graphics tool in the Image Editor text box. Click OK, and your image editor is set. Now when you need to launch the editor, your favorite image editor will open with the selected image already loaded. You can then make your changes, save it, and just click back in Dreamweaver to see the new-and-improved image. (If you resize the image, you'll have to hit Refresh in the Property Inspector.) Reduce
Image Size But if you look at the image's size in the Property Inspector before and after you do this, you'll see that the file size of the image stays the same. This is because you're not really changing the file, you're just scaling down the image's appearance. Since load time is important on the Web--visitors who just leave your page if they grow tired of waiting for images to load--you want to get rid of any unnecessary bytes. Select the image and click the Edit button that appears in the Property Inspector. This will automatically launch your default image editor with the graphic loaded and ready to edit. Do your editing, resizing, or whatever, save your file, and then click back to Dreamweaver. Just click Refresh and you'll see your new image resized, with a smaller file size in the status bar. Convert
Layers to Tables So what if you want the benefits of absolute positioning but also want the page to look correct in older browsers? That's where Dreamweaver's layers-to-tables conversion comes in. By converting the layers to tables, you let older browsers view your nice layout. Furthermore, although you could start your layout with tables in the first place, it is much easier to use Dreamweaver's layer feature when it comes to complex layout. To convert your layer to tables, select Modify/Layout/Convert Layers to Table. You'll have several options, including whether to use transparent gifs for spacing within your table. You may want to select this option since it will make your layout consistent on different browsers. You can also use File/Convert/3.0 Browser Compatible to convert your layers, change your CSS style information to HTML, or both. Your page will be automatically converted with no complex-table coding from you. The style information is replaced with HTML and any coding that can't be replaced is removed. This option creates a separate, converted file and preserves the original file with layers. Dreamweaver cannot convert overlapped layers, so you'll want to check View/Prevent Layer Overlaps while you're designing your pages. This will make it impossible for you to create overlapped layers. Create
a Frameset This feature does have a learning curve and can be confusing for those experienced Web builders familiar with coding framesets in HTML. But once you use this tip to master framesets, Dreamweaver can make the process a lot simpler. Creating the
Frameset You can then subdivide these frames by going through the same steps again. However, if you want to create a frameset with four frames, it's simpler to create it by choosing View/Frame Borders and then holding down Alt (Windows) or Option (Mac) and dragging the outside frame border onto the screen. If at any time you want to delete one of the frames, you can drag the frame border all of the way off the page or to the border of the parent frame. Or if you want to add more frames, go to Modify/Frameset and choose one of those options. Loading the
Content
Saving the
Frameset
When you save your frameset, you'll want to make sure to choose Save All if you want to save all of the open documents at once. If you're only saving one frame's contents, click in that frame and choose File/Save. If you're only save the frameset file, choose File/Save Frameset or File/Save Frameset As. These frame tips will get you started with Dreamweaver's frame feature. But the more you practice creating frames in the Wysiwyg editor, the more intuitive it will be for you. The Frames palette (Window/Frames) can also be helpful for viewing and selecting frames.
Select
Discontinuous Table Cells For instance, if you want individual cells, but not the entire row, to have the same formatting, you would probably go into the code and edit the relevant attributes by hand. Depending on the size of the tables, and the number of individual cells that you want to have similar formatting, this can get pretty tedious. Looking for and tweaking individual <TD> tags by hand isn't very productive and makes your code prone to errors. In Dreamweaver 2.0, you can select discontinuous cells so easily in the layout view that it could save you hours of work and frustration. Select individual cells anywhere in the table by holding down Control (Windows) or Command (Mac) and clicking on cells you want to format. (If you make a mistake, you can subtract cells by clicking them again.) Apply your formatting and watch how easy it is to add code to separate places within your document without searching for the correct cells or copying and pasting indefinitely. It's this attention to detail that makes Dreamweaver such a popular tool among Web builders.
Sort
a Table's Contents If you're aware of how this little trick works, it can be a pretty powerful option when developing pages with complex tables. For instance, assume you want users to be able to alternate between two different versions of a table, each sorted differently, and that you don't have database knowledge. Use Dreamweaver's sort feature to create two versions of the same table and page and then link the two separate versions using user mouse clicks. To sort a table, click in it (or select it) and choose Commands/Sort Table. The Sort Table dialog box will give you several options by which you can sort, including the following:
Be sure to select Sort Includes First Row if the table
has no header rows, and select Keep TR Attributes With Sorted Rows if
you have formatting information that applies to an entire row's data
that you want to keep with that specific data no matter where it appears
in the sorted table.
Dreamweaver does not allow you to sort tables that contain colspan or rowspan attributes-that is, tables with merged cells. You can get around this for tables with merged rows. Just split that row to match the rest of the table by selecting the cells and choosing Modify/Table/Split Cell (or the Split button in the Properties Inspector). Then, just leave the cells blank; Dreamweaver will automatically insert a non-breaking space into those cells. You can now sort the table and then re-merge that row if necessary.
Site
Tips
Dreamweaver has added a whole host of site-management features in Version 2.0. Use these tips to master them. Make a Site
Map From the Site view, you can reorganize your site or add images or links by just dragging and dropping files. You can also control the zoom level of map if you only want to interact with a small portion of it. The Site view makes maintenance easy with these colors and icons:
To customize the layout of the site map, choose View/Layout (Windows) or Site/Site Map View/Layout (Mac). You can then specify the number of columns to display, the width of those columns, and more. Unfortunately, the site map cannot be displayed vertically.
Cut
Down on the Clutter
An occasional complaint about Dreamweaver is that it has a cluttered workspace. The Document window, the Launcher, the Object palette, the HTML Inspector, and the Properties Inspector--it's possible to have all these windows open at the same time, as well as several other task-specific, floating palettes. No wonder some Web builders are overwhelmed. To clean up the clutter, select Window/Arrange Floating Palettes. This will put all the open floating palettes in their default positions. You can also select Window/Hide Floating Palettes to close all of the open palettes at once (or use F4 to toggle between having them open or closed). To have all the palettes open but make the desktop a little neater, drop one floating palette onto another. This will create a tabbed palette where you can access each one with a click. But those windows are not the only ones contributing to the workspace clutter. Every time you open a document in Dreamweaver, a new window opens. If you're like most Web builders, you may be working on several pages in one session. The more files you work on, the more Document windows taking up screen real estate. Windows users can disable this feature and have all documents open in the active window. Select Edit/Preferences and highlight General in the left column. Deselect the Open Files in New Window option, and you'll soon be free from window overload when working on your site. (This option is not available to Mac users.) Improve
Performance
|