Unconfigured Ad Widget

Collapse

Any web developers here?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skyadrenaline
    Member
    • Dec 2009
    • 194

    Any web developers here?

    I got a simple problem, should be easy to fix except I don't know much beyond basic HTML.

    I'm trying to layer a text over an image, and have both be links to the same link. I used simple tables, with div tags for the text. I'm trying to avoid making an image for every link, trying to go for minimal data transfer needed. So instead of nine images, I have one that serves as the background for all of them. It works in IE, but not in Firefox. What gives?

    Is there a more elegant solution?



    Thanks in advance.

    I should probably disclose that it's work-related, but my boss doesn't know I'm working on it. I'm just tinkering around with an idea and if it works, I'll show it to him.
    Last edited by skyadrenaline; 09-03-2010, 10:07 PM.
  • #2
    Datamancer
    In Memoriam
    • May 2010
    • 615

    Originally posted by skyadrenaline
    I got a simple problem, should be easy to fix except I don't know much beyond basic HTML.

    I'm trying to layer a text over an image, and have both be links to the same link. I used simple tables, with div tags for the text. I'm trying to avoid making an image for every link, trying to go for minimal data transfer needed. So instead of nine images, I have one that serves as the background for all of them. It works in IE, but not in Firefox. What gives?

    Is there a more elegant solution?



    Thanks in advance.

    I should probably disclose that it's work-related, but my boss doesn't know I'm working on it. I'm just tinkering around with an idea and if it works, I'll show it to him.
    So let me get this straight...you're trying to make almost like a navigation menu where you can click anywhere within the table cell instead of having to click specifically on the text? I think you can do that by moving your anchor tags to the outside of the table cell code, but since it works in IE and nothing else, it sounds like that's what you may have done. it's not quite proper syntax to do it that way, but IE will sometimes parse it anyway.

    Have you though of using Javascript or CSS instead?

    Here's a CSS example- http://www.dreamweaverresources.com/...kable_cell.htm
    If you view the sourcecode for that page, you could basically cut-and-paste and tweak it to your own purposes.
    Or,
    If you wanted to try the Javascript method, it would look something like this-
    HTML Code:
    <td bgcolor=white onmouseover="this.bgColor='#d3d3d3'" onmouseout="this.bgColor='white'" onClick="window.location='http://www.Calguns.net'" Style="cursor:hand">
    Calguns</td>
    Hope that helps!

    -~D~-
    WTB- hopelessly Bubba'ed cheap rifles for artful re-Bubbafication.

    Comment

    • #3
      TacFan
      Veteran Member
      • Jan 2006
      • 3021

      i would look into image maps

      W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
      For Sale
      🔫 Pistols

      ☠ Rifles

      Comment

      • #4
        Datamancer
        In Memoriam
        • May 2010
        • 615

        Originally posted by Datamancer
        So let me get this straight...you're trying to make almost like a navigation menu where you can click anywhere within the table cell instead of having to click specifically on the text? I think you can do that by moving your anchor tags to the outside of the table cell code, but since it works in IE and nothing else, it sounds like that's what you may have done. it's not quite proper syntax to do it that way, but IE will sometimes parse it anyway.

        Have you though of using Javascript or CSS instead?

        Here's a CSS example- http://www.dreamweaverresources.com/...kable_cell.htm
        If you view the sourcecode for that page, you could basically cut-and-paste and tweak it to your own purposes.
        Or,
        If you wanted to try the Javascript method, it would look something like this-
        HTML Code:
        <td bgcolor=white onmouseover="this.bgColor='#d3d3d3'" onmouseout="this.bgColor='white'" onClick="window.location='http://www.Calguns.net'" Style="cursor:hand">
        Calguns</td>
        Hope that helps!

        -~D~-
        Oh, I forgot to mention...you can also replace the hex color codes with a transparency and the transparent cell should display your background image through it while keeping the entire cell clickable.

        -~D~-
        WTB- hopelessly Bubba'ed cheap rifles for artful re-Bubbafication.

        Comment

        • #5
          fdbizzle
          Junior Member
          • Apr 2010
          • 53

          Use CSS and/or jquery

          Comment

          Working...
          UA-8071174-1