Ok. Then I can explain how to put a part of the WD design into a particular <div> element using placeholders.
This was asked at least twice on this forum.
Note this is not trivial or perfectly straightforward method, so unless you feel comfortable messing with code I would suggest not to bother with it.
First of all, you have to select the object(s) that you want to be exported within your <div> element. This is done by the objects order (z-order) in WD.
Create two placeholder objects. One just under (behind) and one just above (in front of) the object(s) you want. Think of them as opening and closing tags.
To simplify management of these objects, you can use layers (but only if your object is on the static layer, popups can have only one layer). Create three consecutive layers. Put opening and closing placeholders on the first and third layer, and all your objects that has to be within the <div> in the middle layer. This way their order will remain during document editing and it is easy to see and manage the content within the div. You can see this approach used in the Sticky footer, Dynamic page and Loading screen tweaks for example.
Next, as you have the two placeholders, you have to give them some code. The bottom placeholder is an opening one, and the topmost is a closing.
Put following code in the opening placeholder:
Code:
</div>
<div id="my_div" name="Whatever">
<div>
Where the red part is your <div> element opening tag. It may be any opening tag, not only div. You can set all the attributes here. But keep the black part untouched.
Put following code in the closing placeholder:
Code:
</div>
</div>
<div>
The red part is your closing tag. If you are using <div> element then you can close it with much simpler code:
That's it. All the objects placed between these two placeholders will be exported within your <div> or any other element you use.
Also see the attached example file (you'll have to look into the exported HTML source to see the result ).
Bookmarks