The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fold down text coding

2 posters

Go down

Fold down text coding Empty Fold down text coding

Post by Puttfunhouse. August 3rd 2010, 2:01 am

What is the HTML coding for when I have it so I can have a certain text saying something, and then when you click it a little bit of text opens up (To make the page short when opened, but allowing you to extend it by clicking on the text)

~PF
Puttfunhouse.
Puttfunhouse.
Forumember

Posts : 58
Reputation : 0
Language : English
Location : ****

Back to top Go down

Fold down text coding Empty Re: Fold down text coding

Post by Fred1000 August 3rd 2010, 2:56 am

Unknown Data wrote:
1. Step - Open PopUp
For the first, you'll have to make a link to open the PopUp, but it's now a normal link. Some small attributes are added.
<a onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();' onclick="document.getElementById('The PopUp have to got a ID, it could be fx "1"').style.display = 'block' " >Name of the PopUp link</a>
2. Step - Design
At this step we now have to make the PopUp, it look like this.
<div id='The same ID you used in Open PopUp-step' style='display: none; position: absolute;>Here you put normal tags, text, effects in - like you would design a normal page (body)</div>
We aren't done yet, there are som small attributes you have to put in the 'div' tag. I've just posted the code without the attributes source, then you you to redirect the red stroke. You don't have to use all the attributes!
<div id='' style='display: none; position: absolute; left: -px; top: -px; border: -px; padding: -px; background-color: -; text-align: -; font-size: -px; width: -px;' ></div>
All right now we just need to know what all this means. More can be added, it's up to you.
AttributeExampleWhat do we get?
left:280How many pixelse from the left, the PopUp would be placed
top:150How many pixelse from the top, the PopUp would be placed
border:solid black 1Like in a table, frame color and size
padding:10The padding for the PopUp
background-color:whiteThe background color
text-align:justifyWhich text type
font-size:10The size of the text
width:1000The width of the PopUp
We also have to close the PopUp, so place this code inside the PopUp body.
<a onmouseover='this.style.cursor="pointer" onfocus='this.blur();' onclick="document.getElementById('The ID you used at the Open PopUp-step').style.display = 'none' " >Close</a></div>
So we got it all, now you should cud make a PopUp without opening a new window.



It's been written by Unknown Data on/for Webartz , I do not own this tutorial , it's been written by Unknown Data.
Fred1000
Fred1000
Forumember

Male Posts : 118
Reputation : 50
Language : English / Hindi / Spam / Stutter
Location : Lol...Chinese zodiac...'Pig' haha I feel flattered for some reason.

http://www.art-castle.biz/index.htm

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum