Computing.Net > Forums > Web Development > Div tag

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Div tag

Reply to Message Icon

Name: cambo (by gcambo)
Date: May 2, 2004 at 17:24:01 Pacific
OS: win 98
CPU/Ram: AMD/ATH 512
Comment:

Can anyone help me, a friend once showed me how using div tags to move text, jpgs,Gifs anywhere and in front or behind anything on your web page. I just cannot remember what it was that he showed me.I guess it is like over lapping layers if that makes any sence.



Sponsored Link
Ads by Google

Response Number 1
Name: bhupi
Date: May 2, 2004 at 22:45:46 Pacific
Reply:

The following example demonstrates subdividing an HTML page with <DIV> tags, and setting the display style property so that it displays the division when the user clicks an input button.

<SCRIPT LANGUAGE = "VBScript">

Sub ShowDiv()
'This subroutine is called when the user clicks a select button.
'It displays text in the hidden DIV.
document.all.MyDiv.style.display = ""
End Sub

</SCRIPT>

<DIV ID= "MyDiv" style="display: 'none'" >
This is some hidden text.
</DIV>
<Select id= "Showit" onclick=ShowDiv>


Initially, the display style is set to none. To view the contents of the div, set the style to the default value, inline.The object is rendered as an inline element sized by the dimensions of the content. U can now use as many divs as u want and display them as required.

Bhupi


0

Response Number 2
Name: yvarg1959
Date: May 7, 2004 at 12:18:31 Pacific
Reply:

I think I know what you are asking for. I maintain a website for a trailer manufacturer that was originally set up using DIV tags with layers like this:

<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 545px; top: 721px;">

If you want to see this in use go to www.rockettrailers.com and check out View>Source. I did not build this page but like the way the tags work for positioning. I hope this helps.


0

Response Number 3
Name: yvarg1959
Date: May 7, 2004 at 12:23:09 Pacific
Reply:

Oooh yea, forgot to tell you. Just enter the size of the area you want text to be in using the "Width and Height" tags and the position using the "Left and Top" tags. If I remember correctly, the Z-Index sets the position of the layer in the stacking order.


0

Response Number 4
Name: cambo (by gcambo)
Date: May 11, 2004 at 18:01:47 Pacific
Reply:

Thank you bhupi and yvarg1959 I am going to try your ideas and give it a go and see how it works out.


0

Response Number 5
Name: OneSideZero
Date: May 13, 2004 at 05:20:24 Pacific
Reply:

use the z-index tag
just search google or visit
http://www.w3schools.com/


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Editing ASP/ShoppingCart Images won't load - real...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Div tag

div tag www.computing.net/answers/webdevel/div-tag/1315.html

div tags in html www.computing.net/answers/webdevel/div-tags-in-html/1129.html

Help with div layers and background www.computing.net/answers/webdevel/help-with-div-layers-and-background/2257.html