Realization of multi-resolution layer localization with Dreamweaver CS3

Source: Internet
Author: User
Tags dreamweaver

1, first you need to go to the website to download a plug-in named Centerlayers 2.3 (download before the website must be registered), the size of 8KB (you can also pass the message of our website to ask for the plugin!)! )。 Then use the Exention Manager to install the plug-in. Restart Dreamweaver CS3 to make plug-ins work, set the page needs to locate the layer for Layerl, and then create a new transparent layer, set to Layer2 and move it to the center of the window, will represent the Layerl yellow label selected and dragged to the Layer2, adjust the Layerl position.

2, select Layer2, from the Window menu midpoint "Behaviors" open the Behavior Control Panel, click the "+" number, you can see the Centerlayer 2.3 command already appears in the Open menu, click this command, a dialog box appears, in the Name Layers In the selected Layer2, the Ccenter horizontal and center Vertical options indicate the position where the layer can be positioned at the horizontal or vertical center of the browser window, and if both are ticked, the LAYER2 layer is in the center of the window. We only need the horizontal position here, we will select "Center horizontal", and then click "OK" to complete the creation of JavaScript.

3, next we need to make the necessary adjustments, because the "Behaviors" Panel default event property is "OnClick", which means that only when you preview the click of Layer2 will move the layer to the center of the window, so we need to source code in the layer code in the onclick= " Bw-centerlayers 0 "checked to" "" "in the middle, and then" OnClick "renamed" OnLoad ", that is, let the bw-centerlayers 0 function in the page load is executed, so we basically completed the layer Layerl positioning.

4, there is a point, when the browser defaults to open the value is not maximized and need to manually point "maximize" button, Layer2 layer can not be adjusted with the changes in the window, need to refresh to move to the window center, how to do? Don't forget that we also have the "OnResize" action, select "onload=" Bw_centerlayers 0 "" To copy and paste it behind this action. Then "onload" renamed "OnResize", so that the page load will execute two events, that is, "onload" and "onResize." Ok! Open the browser with a different resolution to preview it. You will find that the "layer" has become very obedient.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.