Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Thanked 0 Times in 0 Posts

    Cool child target within a parent target

    Hi, I am trying to link to a target div element within a target object element in one link. This is confusing, so I'll explain.
    In my 'INDEX.HTML' I have an object(where the data comes from a separate page).

    CSS/HTML looks like this.
        <object data="SEPERATEPAGE.HTML" id ="page1" height=400 width=600></object>
    Now, within that SEPERATEPAGE.HTML I have a similar commands.
          #section1 {display:none;}
          #section1:target {display:block;}
          <div id="section1">Here is the content I'm trying to link to</div>
    And So, my question is How do I link from INDEX.HTML to #section1 displayed as a block within #page2 ?

    My link is placed in a #page1 object (also a seperate page similar to the #page2)

    I tried this with no avail
    <a href="#page2#section1" target="_parent">Super Epic Link</a>
    Is this possible? My #page2 is a blog section of the site, where #section1 is a blog entry. I want to link from outside of #page1 itself so I can feature it on other parts of the site etc. It means less clicks for my end users.

  2. #2
    New Coder
    Join Date
    Aug 2011
    Thanked 2 Times in 2 Posts

    I'm not quite sure I am clear on what you're trying to do.. You are trying to link from one page to the section of another page?

    Try using:
    <a href="SEPERATEPAGE.HTML#section1">Super Epic Link</a>
    where the #section must be an anchor you drop into where you want to jump to (which will be within SEPARATEPAGE.HTML somewhere):
    <a name="section1" />
    That is if you just want to like to the section. Unless you wanted to actually preview the actual part of the page from within INDEX.html without leaving the index page?
    Last edited by chaule; 09-22-2011 at 06:34 AM.


Tags for this Thread

Posting Permissions

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