Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Html frames

Status
Not open for further replies.

djmcfresh

Technical User
Aug 21, 2001
16
US
Could someone give me the basic code for frames and any instuctions i may need to use them. Thanks.
 
Theres a bit of versitility here, but this should get u started.
Code:
---------------------------
<html>
<head>
 <title>My Frameset</title>
</head>
Code:
<frameset cols=&quot;100,*&quot; rows=&quot;100%&quot;>
Code:
<! The line above defines the set of frames. The cols attribute currently says &quot;i want two columns one is going to be 100px wide, and the next one will take up the remainder of the window&quot; The rows attribute says &quot;there will only be one row, and it will be the full height of the window.&quot; The values you put in can be percentages or actual values >

Code:
 <frame name=&quot;leftframe&quot; src=&quot;menu.html&quot;>
Code:
<! The line above (line 2) defines the name and source for the left frame >

Code:
 <frame name=&quot;rightframe&quot; src=&quot;home.html&quot;>
Code:
<! The line above (line 3) defines the name and source for the right frame >

Code:
</frameset>
Code:
<! End all frame stuff >

Code:
<noframes>
Sorry, but you need a new browser
</noframes>
Code:
<! The noframes tag should contain the default text to display if the user has a browser that doesn't support frames >
Code:
</html>
---------------------------
This is usually how frames are used (menu on left, content on right). To get a link in the leftframe to open in the rightframe, you need to add the target attribute to your links. if you a have a link to pageone.html, your link (in the leftframe) would be
Code:
<a href=&quot;[URL unfurl="true"]http://some.domain.com/pageone.html&quot;[/URL] target=&quot;rightframe&quot;>

Got all that? -gerrygerry
misanthropist01@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top