Dreamweaver
I. Problems that often arise When your table is centered and inserted into the layer (insert Layer method 1:object->draw layer) (800*600), once the resolution is larger, the window maximized, the layer is misplaced, and if the menu (Insert Layer Method 2:insert-> Layer) when inserting a layer, the layer is positioned relative to its superior element, but once it is moved in Dreamweaver with a mobile tool, it becomes an absolute position and is not positioned relative to the superior element.
two. Thought: The layer that is placed through the object panel is the absolutely positioned layer, which refers to the upper-left corner of the layer and the left and top of the browser window, and the code is written in the left-hand and upper parts.
The layer that is placed through the menu is the relative positioning layer, this relative positioning refers to the distance between the layer and its superior element (the upper-left corner of its superior element), and since the Div no longer has the property of leave and top, the browser places its position as the same as its ancestor element.
(Summary one: As long as remove the layer left and top properties can be relative positioning!) )
three. Deep thinking: Now the level has been relatively fixed, but this is not enough to meet the requirements, because many times can not set the table so accurate, otherwise the table will be very troublesome, the code is very big.
If the above mentioned made the relative positioning of the layer on the basis of another layer to its relative positioning, do not solve the problem? This involves the problem of the parent layer and the child layer (because it is the basis of the layer, in the book and online tutorials can be seen, no longer elaborated here, the parent layer relative to a point positioning, and the child relative to the parent level positioning, you can achieve the level of relative positioning of the goal.
four. Specific production(Only the simplest method, a friend who is familiar with the code can knock):
Insert a table in the page (you can center, the table is centered, otherwise almost meaningless), the mouse in a cell point, let the cursor here flashing, and then through the menu to insert a layer, this layer is relative to this cell positioning. After inserting a layer, do not move it, and also never move, but you can change its size, such as its height and width are changed to "0", so that it no longer affect your edits to other content, otherwise, this layer left and top attributes appear after the absolute positioning of the When you turn to absolute positioning, you can remove its left and top attributes and revert to relative positioning. After becoming "0", sometimes the child layer will not be visible, you can press [F11] key point it resumes editing. Now the cursor in this layer flashing, and then through the menu to insert the child layer, when the child layer and the parent layer overlap, you can move it at will, regardless of how it moves, it is relative to the parent layer positioning.
Well, a relatively positioned layer (child layer) is done, you can add content in it, you can change its size, position, background and all other attributes, but do not move the left and top properties, because it is relative to the parent of the upper left-hand corner positioning.
The following gives the properties panel of the parent and child layers in Dreamweaver:
Parent layer:
Child layer:
five. Tips: First insert a table, in one of the cells into the parent layer, you can make it smaller, such as 20 like pixels, 10 pixels high, so that it will not cover the link below, and does not affect the relative positioning of the child layer.
If you want to define a table with 778 pixel widths, you can insert the parent layer into the first cell in the first row of the table, so that you can insert the parent layer after all the layers have been made! A friend who is familiar with the code can knock the parent layer without having to adjust the child's position.
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