View Single Post
Old 09-21-2011, 09:22 PM   PM User | #1
n00b_padawan
New to the CF scene

 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
n00b_padawan is an unknown quantity at this point
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.
Code:
     #page2{display:none;}
     #page2:target{display:block;}

    <object data="SEPERATEPAGE.HTML" id ="page1" height=400 width=600></object>
Now, within that SEPERATEPAGE.HTML I have a similar commands.
Code:
      #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
Code:
<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.
n00b_padawan is offline   Reply With Quote