Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: pic won't link

  1. #1
    Member ravage's Avatar
    Join Date
    Apr 2011
    Posts
    92
    Member #
    27355
    Liked
    2 times
    so i can't get an image to hyper link

    here's the html (the aforementioned image is highlighted in bold):

    [COLOR=rgb(0, 0, 255)]<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n"; ?>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/COLOR]
    [COLOR=rgb(0, 0, 255)]<html xmlns="http://www.w3.org/1999/xhtml">[/COLOR]
    [COLOR=rgb(0, 0, 255)]<head>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />[/COLOR]
    [COLOR=rgb(0, 0, 255)]<title>Coming Soon</title>[/COLOR]

    [COLOR=rgb(0, 0, 255)]<link rel="stylesheet"type="text/css" media="screen" href="css/screen.css" />[/COLOR]

    [COLOR=rgb(0, 0, 255)]</head>[/COLOR]

    [COLOR=rgb(0, 0, 255)]<body>[/COLOR]

    [COLOR=rgb(0, 0, 255)]<div id="content">[/COLOR]
    [COLOR=rgb(0, 0, 255)]<div class="inside">[/COLOR]
    [COLOR=rgb(0, 0, 255)]<div class="logo"><img src="img/" alt="" /></div></br>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<h1>Partridge Animal Hospital</br></br>[/COLOR]
    [COLOR=rgb(0, 0, 255)] Website Coming Soon</h1>[/COLOR]
    [COLOR=rgb(0, 0, 255)]</div>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<!--<div id="logo"></div>-->[/COLOR]
    [COLOR=rgb(0, 0, 255)] <div class="inside">[/COLOR]
    [COLOR=rgb(0, 0, 255)] <p><strong>Please visit</strong></br>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]</p>[/COLOR]


    [COLOR=rgb(0, 0, 255)]<p><strong>Hours:</strong><br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Monday - 8AM - 5:30 PM<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Tuesday - 8AM - 5:30 PM<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Wednesday - 8AM - 5:30 PM<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Thursday - 8AM - 5:30 PM<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Friday - 8AM - 5:30 PM<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Saturday - Closed<br/>[/COLOR]
    [COLOR=rgb(0, 0, 255)]Sunday - Closed</p>[/COLOR]

    [COLOR=rgb(0, 0, 255)]<div class="pet_portal"><a href="http://www.google.com" target="_blank"><img src="img/petPortal.jpg" alt="Pet Portal Login" /></a></div>[/COLOR]

    [COLOR=rgb(0, 0, 255)] <h2>Website design and hosting by <a href="" target="_blank"></a></h2>[/COLOR]
    [COLOR=rgb(0, 0, 255)] </div>[/COLOR]

    [COLOR=rgb(0, 0, 255)]</div>[/COLOR]
    [COLOR=rgb(0, 0, 255)]</body>[/COLOR]
    [COLOR=rgb(0, 0, 255)]</html>[/COLOR]


    here's the related css (the specific id is in blod):

    [COLOR=rgb(0, 0, 255)]body {[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin: 0;[/COLOR]
    [COLOR=rgb(0, 0, 255)] padding: 0;[/COLOR]
    [COLOR=rgb(0, 0, 255)] /*background: #fff url(../bkg.gif) 0 0 repeat-x;*/[/COLOR]
    [COLOR=rgb(0, 0, 255)] font-family: Tahoma, Geneva, "Bitstream Vera Sans", sans-serif;[/COLOR]
    [COLOR=rgb(0, 0, 255)] text-align: center;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)]#content {[/COLOR]
    [COLOR=rgb(0, 0, 255)] position: relative;[/COLOR]
    [COLOR=rgb(0, 0, 255)] width: 635px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] padding: 0;[/COLOR]
    [COLOR=rgb(0, 0, 255)] top: 57px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin-left: auto;[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin-right: auto;[/COLOR]
    [COLOR=rgb(0, 0, 255)] z-index:-1;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)]#logo { [/COLOR]
    [COLOR=rgb(0, 0, 255)] position: relative;[/COLOR]
    [COLOR=rgb(0, 0, 255)] width: 345px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] height: 319px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin: 0 auto;[/COLOR]
    [COLOR=rgb(0, 0, 255)] z-index:999;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)]#pet_portal { [/COLOR]
    [COLOR=rgb(0, 0, 255)] position: relative;[/COLOR]
    [COLOR=rgb(0, 0, 255)] width: 208px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] height: 51px;[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin: auto auto;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)]#pet_portal a {color:#ffffff; font-weight:bold;}[/COLOR]
    [COLOR=rgb(0, 0, 255)]#pet_portal a:hover { text-decoration:none; color:#ffffff; }[/COLOR]

    [COLOR=rgb(0, 0, 255)].inside {[/COLOR]
    [COLOR=rgb(0, 0, 255)] text-align: center;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)].inside h1 { [/COLOR]
    [COLOR=rgb(0, 0, 255)] font-size: 1.8em;[/COLOR]
    [COLOR=rgb(0, 0, 255)] margin: 0;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)].inside h2 { [/COLOR]
    [COLOR=rgb(0, 0, 255)] margin: 35px 0;[/COLOR]
    [COLOR=rgb(0, 0, 255)] font-size: 1.2em;[/COLOR]
    [COLOR=rgb(0, 0, 255)]}[/COLOR]

    [COLOR=rgb(0, 0, 255)]a { color: #0a53a5; }[/COLOR]

    I ran it the the index through xhtml validation and the style sheet through css validation and they both result without any errors.

    any ideas???

    cheers!

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Validation is done on a page by page basis, so even if there are problems with the way the HTML and CSS work together, if the code is good, they will validate.

    In your HTML you have set pet_portal as a class, in your CSS you have it as a div. Change one or the other so they agree, and see if that helps.

    Also, check your path for the image - if it is more than one level up or down from the page, you may need to do ../img/petPortal.jpg

    Is the page live? Post a link if neither of those work.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Member ravage's Avatar
    Join Date
    Apr 2011
    Posts
    92
    Member #
    27355
    Liked
    2 times
    hey, thanks for picking up on that class/id mistake. fixing that didn't change it.

    what i did was create a new link id for that particular class which had the same dimensions as the image I was trying to link and that solved it.

    #pet_portal {
    position: relative;
    width: 208px;
    height: 51px;
    padding-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    }

    a#pet_portal{
    display: block;
    position: relative;
    background: transparent;
    width: 208px;
    height: 51px;
    cursor: pointer;
    }

    thanks for the help!
    AlphaMare likes this.

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Thanks for posting your solution - you never now who may have the same problem and this may help them out!
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com