Announcement Announcement Module
Collapse
No announcement yet.
Linking to a certain section of another page...bug? Page Title Module
Move Remove Collapse
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linking to a certain section of another page...bug?

    #1
    I know how this is accomplished...

    <a href="http://blah.com/page2.html#section2"><a>

    on page2.html...

    <h2 id="section2"></h2>

    It works fine when I put the id on a header element, but if I try to put it on a div it doesn't work. Is this normal? I noticed it works in IE7, but not Firefox or Safari.

  • #2
    You should be targeting a named anchor, not an id:

    <a href="http://blah.com/page2.html#section2"><a>

    on page2.html...

    <a name="section2"><a><h2 id="section2"></h2>


    Digi

    Comment


    • #3
      Originally posted by digizan View Post
      You should be targeting a named anchor, not an id:

      <a href="http://blah.com/page2.html#section2"><a>

      on page2.html...

      <a name="section2"><a><h2 id="section2"></h2>


      Digi

      seems a little weird to put a blank anchor tag doesn't it?

      Comment


      • #4
        Originally posted by MikeTheVike View Post
        seems a little weird to put a blank anchor tag doesn't it?
        Not to me it doesn't. ;-)

        You could wrap your anchor around the text of your heading:

        <h2 id="section2"><a name="section2">Foo<a></h2>

        But then you're probably going to have to add more CSS to stop the heading from looking like a link.

        Digi

        Comment


        • #5
          Okay, I've been up all night finishing a web site and my brain is toast right now.

          This should work:

          <h2 id="section2" name="section2">Foo</h2>

          Digi

          Comment


          • #6
            Originally posted by digizan View Post
            Okay, I've been up all night finishing a web site and my brain is toast right now.

            This should work:

            <h2 id="section2" name="section2">Foo</h2>

            Digi

            yea, it actually works with just the "id", the "name" isn't necessary. I was just wondering why it wasn't working on a div because it would make my heading a little more visible if the page jumped to the top of my div instead of the heading.

            Comment


            • #7
              Originally posted by MikeTheVike View Post
              yea, it actually works with just the "id", the "name" isn't necessary. I was just wondering why it wasn't working on a div because it would make my heading a little more visible if the page jumped to the top of my div instead of the heading.
              Yeah, now that I've gotten a couple of hours of sleep it's clear what you were asking. I should know better than to post on the forums when I'm dead tired like that.

              Anyway, I created a test page and have no problem jumping to a div using an id in either FF or Safari. Maybe you're overlooking something?

              Digi

              Comment

              Google search Google search Module
              Collapse
              Latest Topics Latest Topics Module
              Collapse
              • firefighter26's Avatar
                The other images that were provided, luckily, had their own clipping paths so they were not an issue. I've used this process numerous times before (which is why it was frustrating when it didn't work!),...
              • Navian's Avatar
                Commented to Poster design
                The curvature continuity "smoothness" of the shoe shapes needs to be cleaned up.
              • MalcolmTheCat's Avatar
                The problem you're facing is one I face all the time. The easiest solution is to create a clipping path in photoshop. You haven't missed any steps, it all starts because transparencies and spot colours...
              • peter lewis's Avatar
                Commented to site logo
                thanks for your interest. it is no longer available because i have decided to go with a full width header. cheers!
              • peter lewis's Avatar
                Commented to review logo please
                thanks for the comments. it sounds like using a full width header is a better option. no more comments please - i have taken down the logo from my host account. cheers!
              • Red Kittie Kat's Avatar
                To any and all who don't already know this....



                We have a Facebook Page if anyone would like to come join the conversations over there. I realize not all have Facebook... but,...
              • PanToshi's Avatar
                Commented to Poster design
                Adding my thoughts to the pot:



                - Kerning needs attention.

                - Why have tiny illegible type especially with a big blank space at the bottom?

                - Font chosen...
              • Red Kittie Kat's Avatar
                Commented to Newbie
                Welcome Aboard
              All Creative World Network All Creative World Network Module
              Collapse
              WebMediaBrands
              Mediabistro | SemanticWeb | Inside Network
              Jobs | Education | Research | Events | News
              Advertise | Terms of Use | Privacy Policy
              Copyright WebMediaBrands Inc. All rights reserved.
              Working...
              X