www.webdeveloper.com
Results 1 to 7 of 7

Thread: target div tags

  1. #1
    Join Date
    Jan 2011
    Posts
    39

    target div tags

    How do you target a screen area defined by div tags like you target a screen area defined by frames ?

  2. #2
    Join Date
    Aug 2006
    Posts
    1,904
    Presuming the content that you're trying to put in the div is from your own site, you need to change your mindset around. You don't "target" a piece of content into a box anymore. What you do is provide an entire web page with the new content in that div. So the link you click on to cause this (e.g. maybe from your navigation) should just be a standard <a href="newpage.html"> kind of link, and newpage.html would have the right stuff in the right place.

    Dave

  3. #3
    Join Date
    Jan 2011
    Posts
    39
    Thank you for that.
    How do you click a link in one div tag area and have it put a page in another div tag area ?

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You call you DIVs IFRAMEs.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Aug 2006
    Posts
    1,904
    Quote Originally Posted by neginf View Post
    Thank you for that.
    How do you click a link in one div tag area and have it put a page in another div tag area ?
    So is the "page" you want to display a page of your own development, on your own site? Or is it a page from some other web site. If it's another web site, I agree with Charles, use an iframe for it. But if it's your own site, you should not use an iframe, you should just link to the page itself as I mentioned above.

    Dave

  6. #6
    Join Date
    Jan 2011
    Posts
    39
    Sorry for not understanding right but if the link is in a div area, how does it know to put my page in another div area ?

  7. #7
    Join Date
    Aug 2006
    Posts
    1,904
    It doesn't "put it in another div area", that's the point. Make two pages. Page 1 looks like what you're thinking now is your page (some navigation, some content). Page 2 looks a lot like it, has the sane navigation, and some other content (that corresponds to what you're wanting to be this ""other content in your div"). So both those pages are *complete* web pages with headers, navigation and content. Then you link the navigation from page 1 to the *entire* page 2, not just point it into some div.

    I hope that makes sense...

    Dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles