Dreamweaver Tips 50 Ask Dreamweaver's web design tool, in addition to its powerful dynamic effect, convenient and concise operation interface is more unique, and we will take the latest version Dreamweaver4 as an example, and ask questions Under the introduction of the system, some problems and skills that are often encountered during the design process.
Note: For convenience, the following we reduce Dreamweaver to DW.
1> How to enter a space in DW?
The problem of entering spaces, in DW seems to have become an older talk, we may have seen N times in many books or articles that describe DW.
The restrictions on the space input in DW are for the "half" text state, so by adjusting the input method to the full-corner mode, it can be avoided, the method is: Open the Chinese input method (as an example of manually intelligent ABC), press Shift SPACE switches to the full-angle state, there should be no problem now.
In addition, you can also reach the purpose of entry spaces through many "work" methods, such as common use:
Add HTML code "" directly in the source code ""; after entering a certain length of text object, then adjust the color of the text is the same as the current background color, but not, the latter may be displayed in some browsers. have some problem. (Oh, the one used in the time is to let Wang Chenzhen show it!)
2> How do I add a custom small icon before the browser address bar?
Do you remember that sometimes when you browse the homepage of the NetEase website, you will show a small icon for "easy" before www.163.com. By default, this icon is a specified image of an IE browser. Figure:
In fact, this is not a high-tech, but it has added a specific file to the website directory.
At this time, we need to make an icon file in advance, the size is 16 * 16 pixels. The file extension is ICO and then uploaded to the corresponding directory. Add the following code between the HTML source file "
head>":The "Shortcut icon" is the name of the icon. Of course, if the user uses IE5 or above to browse, it is more simple, simply uploading the picture to the root directory, you can automatically identify!
3> Why, I originally designed a good web page, which will become ugly when the browser window minimizes?
This should be a question that is worth paying attention to, that is, when browsing the content in full-screen state, there is no problem. When we use the window's minimization command or manual adjustment window, the problem will slowly appear. The content of the web page will use the current window as the display range, in turn. For example, it is exactly the same as "automatic wrap" and "no wrap" in the notepad.
To solve this problem, we must start from the layout of the web page, in general, the positioning of the webpage content is achieved by the table. Therefore, the problem of "problem" is also on the table.
Please see the properties panel of the following table display:
You may have noticed that two different types, percentages, and pixels are available on the high and wide settings of the table. The percentage of use will produce the problem mentioned earlier, and all of them can be corrected in the actual size of the Pixels unit.
4> How to change the web page display, the top prompt information?
When browsing the web, the top prompt information often represents the key to web content, helping visitors to understand the webpage content in advance. Before DW4, it is not functionally provided directly, and we tend to be done by applying the "Title" property in the source code. It is more simple to enter DW4. Type the desired text message directly in the "Title" input box of the editing window.
5> How can you add a specified color border to the picture?
For pictures without borders, insert them directly into the web page, it is quite worse on the display. I remember that I want to add a satisfactory border to the picture in Microsoft's FP or quite troublesome.
However, it is much easier in DW, because there is a "border" attribute here, you can set the width of the border directly. Figure:
The width is set, you will ask, color? There is no color selection on the panel! Oh, in fact, there is a skill problem. Use the mouse to select a picture object, be careful not to click check, but drag the selection. It is possible like setting the text color.
6> How to add pictures and link text prompt information?
When we browse the web, when the mouse stays on the image object or link, a prompt message box will appear on the right of the mouse. A note instructions on the target. In some cases, its role is very important.
Let's take a look at the addition of the picture prompt information, select the picture object, you will find a "alt" input box in the property panel. By default, this input box is blank. The content you need to enter here is OK.
Then the production of the link prompt is not so simple. Because this feature is not provided in DW, we need to be implemented by adding HTML code.
Add the "Title" property in . Title = prompt content.
7> How do I download my ZIP or other type of document?
In a lot of primary web makers, it seems that it is very "mysterious" through the mouse click to complete the download is a very "mysterious" thing. In practice, in DW, in DW, the format file (HTM, HTML, "in DW is not being identified by the browser (HTM, HTML, ASP, PHP.PERL, SHTML, etc.) As a link target, the default operation is downloaded.
At this time, you only need to write the file name you want to download by the viewer, then make a link to the target file. Note that the directory must not make mistakes.
8> How can I guarantee that the word in the web page does not change with the browser font size?
Everyone knows that in the functional settings of the IE browser, there is a function of freely set the content font size of the window, so that due to the habit of different visits, the webpage presenting in front of them is sometimes different.
For example, you may have the same 2 font when you design it. As a result, because the user has a big sum of the browser, there is a problem.
So solution is to enforce the content of the webpage content in a suitable size. That is, it is not allowed to change. This requirement can be achieved by mandatory control over the font through the CSS style sheet.
9> Open the goal link in the form of a new window?
Open in a new window, as the name suggestions, that is, open a browser window without overwriting the current window. You can join "Target = _blank" directly in the connection code
If your HTML is worse, this setting is also available on the DW property panel. When you type in the WWW URL in the LINK input box, the latter Target drop-down box is also activated. Figure Select the most upstairs "Blank" is ok. 10> How to let the web page to load, like many commercial websites, pop up an advertising window This is often seen in many large business websites. It can be easily implemented by Behavior behavior in DW. Since we are loaded, we can treat the entire web content as an event object. Click the "
Select the "Open Browse Window" item, then you can also customize the window style, such as the size, the reservation of the tool button, and more. In addition, there is something that don't forget the corresponding event is "online".
11> There is no "Timelines" in my fast startboard. What should I do?
DW From the upgrade to 4 versions, add several new items in the quick start board, such as Assets, etc. At this time, the Timelins button originally squeezed out.
Of course, if you are eager to use it now, you can still find it through the menu "Windows" - "Timelines". But after all, it is better to put it in the launch board. At this time, we can add it to it by setting!
"Edit" - "preference" enters the window, select "PANELS" in the list of items on the left, as shown
Click the " " button above, select "Timelines" from the drop-down list. At this time, the timeline has been automatically added to the current "show in launcher" list, OK. The changed "Launcher" panel is shown.
At the same time, you can also improve the work efficiency based on your own button options you need to freely choose.
12> Make a web page to automatically refresh once every 5 minutes, how to implement it?
When browsing online, we often encounter some web pages. When there is no response over a period of time, it will automatically refresh once. In addition to the purpose of reminding the visitor, when the new refresh address is not the current URL, the implementation is the function of automatic jump.
Whether it is repeated refresh, or automatically jump. In web design, it is quite practical. Let us introduce their production methods.
Select the "HEAD" section of the DW "Object" panel, pay attention to the "content" of Common by default. Figure
Click the "Refresh" button above, the pop-up window is as follows:
Where "DELAY" is typed in the input box (unit: second), "Action" is refreshed the specified target URL. Because it is now refreshing the current page, direct selection option "refresh this document".
13> How do I define keywords (Keyname)?
When the user uses a web page for the search engine Search suitable content, the keyword plays a role that cannot be ignored. Most search servers will automatically detect a new web page in the network every other period of time and record them by keywords to facilitate user query.
You certainly want your web page to appear in the search engine query back to the list, then the definition of the keyword is especially important.
Also in the "HEAD" panel part, as shown
Click the "Keywords" button and pop-up the definition window as follows:
Entering the keyword defined one by one, pay attention to each keyword is separated by ";", the number is not limited.
14> How to hide some unnecessary labels in the editing window?
When the user inserts too many invisible elements in the web page, the top of the editing window will display a row of corresponding labels to facilitate the user to find them at any time. Although these tags itself do not affect the display effect in the browser, but later, it is often necessary to make the content of the webpage to a certain extent, which hinders the adjustment of the webpage, so how can you remove these stuff? Go to the "preperence" panel, select "Invisibel Elements" in the list, as shown:
That you don't want to display the "right", such as S Cripts, etc.
15> Arrange the display of the "framework" browser display?
We know that there are a lot of browser types, so we often consider the most in designing web pages. "Is this something to display in different browsers?". The framework is an example!
However, avoid this, it is very simple, you only need to add the following content in the source code.
16> How to avoid others in the framework?
Some people who have a bad heart, often steal the work of others, such as the web page that carefully produces others in their own frame.
So how to avoid your own web content is "stolen"?
You only need to add the following code between the
head> of the web page source code:
IF (Self! = TOP) {top.location = self.location;
-> s cripe>
17> How to join the comment?
Comment content, as the name implies only appears as an explanation, so it will not appear in the web page when browsing. Its role is to make the necessary indication for certain important or complex code to make it easier and fast.
Enter the "Invisibel" section of the "Object" panel (ie, invisible elements), select the Insert "Comment" button, the window is as follows:
Type the necessary information in "Comment". At this time, if you return to the source code, you will see that these operations added is just a piece of code in the format:
18> Horizontal line, why can't you set color?
In DW, when you insert the horizontal line through the menu "INSERT" - "Horizonal Rule", you will find that there is no setting regarding the horizontal color, because the label
It seems that we can only enter the source file directly to change.
19> How to set up the function of the current window?
Here we can enter the text "Close Window" used to be marked, and select it with the mouse, type "/" in the "Link" input box, and cut into the source code window, type the event in the link code - οnclick = "JavaS cript: window.close (); return false;".
Complete code is: Close window a> Of course, you can also change the text" Close window "to other objects For example, pictures, buttons, etc.!
20> What is the window that is automatically closed?
The above mentioned the function of closing the window, then how is the current automatic shutdown implementation?
Add the following code after the source code
:
SetTimeout ('window.close ();', 10000);
-> s cripe>
Where SET TIMEOUT is a function used to set a delay time, here 10,000 to 10 seconds.
21> How to change the "shape" of the mouse in the browser?
Under normal circumstances, the mouse appears in the "arrow" style in the browser, then can we change it to other style types you like?
Changing the mouse shape is implemented by "CSS Style Table" in DW.
Menu "Text" - "CSS Style" - "Edit Style Sheet", the edit window of the pop-up style sheet, or click the CSS STYL button in the Quick Startboard, as follows:
Click the "New" button, select the default "make customer style", and simultaneously make the style only to the current web document, "this Document Only" in the define below.
Select "Extensing" in the left list item of the Style Definition window, and set the right right
In the "Cursor" (mouse), pull down to select the appropriate shape, then return, press F12 to observe the effect in the browser, if not satisfactorily, can also modify the style.
22> How to remove the underscore below the link text?
After we complete the link production, the link text content is often automatically added to the next underscore, which is used to indicate that the content contains a hyperlink. When a link in a web page is more, it seems that some messy feelings, in fact, we can easily remove it.
Also enter the "Edit Style Sheet" window, click "New" to establish a new style, as follows
In the type (type) here, you need to select "Redefine HTML Tag", while selecting "A" representing a hyperlink in the specific tag tag, click OK.
Edit this style, select "Type" in the left list, as follows
Check the "None" checkbox in "Decoration", then the link text in all web pages is cleared.
23> How to make the mouse "hover" above the link text?
When the website is accessing the website, the most common effect we encounter is "mouse hover response". The so-called "mouse hover response" is acting on the link text, including changing color, modifying effect (underscore, intermediate Line) and many other options.
Since this effect has played a strong emphasis on the content of the target, whether it is a personal website or some large commercial websites (such as Sina, Sohu, NetEase, etc.) have applications.
In the last question, you have known the way to remove the chain next scribe, and details are not described here. The following problem will be how to add a mouse response event. Also enter the "Edit Style Sheet" window, click "New" to establish a new style, different is the last Type type, select the last one - "Use css selector", "Selector" in the "Selector" menu Select "A: Hover" as follows
OK, enter the editing style window, set the text color in the "Type" item to "red", of course, you can also add the underlined effect when the mouse is hover.
24> How to make the web page background picture does not follow the content scroll?
The background picture is something that many web designers often add, when the web content exceeds a screen, pull the scroll bar background picture to scroll with the content relative to still, then can the background do not follow the scroll? Of course, you can enter the "Edit Style Sheet" window, click "New" to establish a new style, select "Redefine HTML TAG" in Type, and the TAG selection "body" is selected, and "Background" is selected in the list. as follows
Set the "attachment" (attachment) to "fixed". Scroll represents the scroll display of the default use.
25> Background music, you must know, how to add it?
In Microsoft's Web Tool -frontPage, the DW is clearly not made in the background music, so it is only possible to manually add it in the source code.
Before use, remind everyone that using the background music must pay attention to the size of the web file, and cannot be exhausted.
code show as below:
Where SRC specifies the location of the music file, Autostart is uploaded by the music file, True indicates the automatic start play, FALSE does not play (default).
26> How to use the horizontal line to make a thin line with a width of 1?
Please click here to see the implementation method (the editor increases)
27> How do I automatically join the date after changes?
Just add the following code between the source file
body>.
Document.write ("Last Updated:" Document.lastModified;
-> s cripe>
The display style in the browser is: "Last Updated: 2001/8/19"
28> How to control pop up POPUP information?
Sometimes, when we click on the link, there will be some key instructions, which is the pop-up information. For example, when a link has not completed the production page of the target content page, you can apply POPUP information to explain.
In appropriate positions in the web page, select the link in the properties panel. Under the premise of remained the status, click the "Behavior" button in the Quick Startboard, such as:
Click on the " " number on the left, select "Popun Message" from the list, enter the information you want to prompt in the subsequent window, as shown
The mouse event (Events) set (onClick) is set. The preview effect in the browser is as follows
29> Hide URL address information for the status bar in the browser? Browse the web, when the mouse stays above the link, the link destination address is automatically displayed in the status bar below, considering security issues, sometimes we need to reset it to "zero", which is set to blank.
Now you only need to do some hands and feet in the link code, as follows
30> How to change the prompt text in the status bar?
By default, when the web is loaded, information such as the address of the page will be displayed in the status bar. Do you want to make it more charming?
In the DW "Behavior" behavior board, click " " to select "Text of Status Bar" option under "Set Text Set", as shown
Enter Message information similar to "Welcome to this website - NMS message" in the "SET TEXT OF STATUS BAR" window.
31> How to build an email form handling method?
The form should be an indispensable element in the web interaction function, the function of the form is interactive, so the form of form is often related to the use of the network advanced programming language, you may say, wow! I won't be programmed! It doesn't matter, in fact, for some simple form content, you can also be implemented by email.
First look at the following code: