iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-16-2003, 12:22 AM
Moderator
WebProWorld Moderator
 
Join Date: Oct 2003
Location: Alberta, Canada
Posts: 878
weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6
Default CSS target loading

How could a person utilize CSS to have a page behave similar to frames (allowing target content to fill the same area of the screen without refreshing the entire page)?
Reply With Quote
  #2 (permalink)  
Old 11-16-2003, 12:57 AM
redcircle's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Grand Rapids, MI USA
Posts: 425
redcircle RepRank 0
Default

put your content on different div's then when a link is clicked you would use javascript to hide one and show the other.

Code:
function Vis()
 {
       document.getElementById('content').style.visibility ='visible';
       document.getElementById('content-container').style.zIndex =10;
       document.getElementById('content').style.display ='block';
}
function noVis()
{
       document.getElementById('content').style.visibility ='hidden';
       document.getElementById('content-container').style.zIndex =3;
       document.getElementById('content').style.display ='none';



}
The down side to the increased load time. All the content for all the pages must be loaded for this to work.

Is it really that necessary NOT to have it refesh?
Reply With Quote
  #3 (permalink)  
Old 11-16-2003, 07:24 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: UK
Posts: 2,089
paulhiles RepRank 0
Default Re: CSS target loading

Quote:
Originally Posted by weegillis
How could a person utilize CSS to have a page behave similar to frames (allowing target content to fill the same area of the screen without refreshing the entire page)?
Hi weegillis,

I'd go along with redcircle's reply... the best way of achieving the effect of frames is by using JavaScript to manipulate the visibility of predetermined div layers.

However, if you want to use CSS only.. Eric Meyer has an interesting CSS popup demo which demonstrates placing different text elements into one targetted 'content' div layer.

Paul
Reply With Quote
  #4 (permalink)  
Old 11-16-2003, 05:08 PM
Moderator
WebProWorld Moderator
 
Join Date: Oct 2003
Location: Alberta, Canada
Posts: 878
weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6
Default Altering Presentation Without Javascript or Cookies

Thanks Paul and redcircle. Eric Meyer is surely one person to sit up and listen to when it comes to CSS. I'm also sure he is not alone, but his presentations are much easier to follow than some others I've examined.

What's more, he would appear to have given a lot of thought to his creations... they all degrade extremely gracefully without CSS support, which is something I would love my own pages to do. I actually learned something today!

Thanks, all.

Roy
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:48 AM.



Search Engine Optimization by vBSEO 3.3.0