www.webdeveloper.com
Results 1 to 10 of 10

Thread: Images wont go in the td in the table.

  1. #1
    Join Date
    Apr 2012
    Posts
    110

    Question Images wont go in the td in the table.

    Hi, I put the following code, but the image wont display, and also the table wont display on the page, goes underneath it at the bottom even though IM using the z-index;

    #container {display:block;postition:absolute;z-index;top:130px;border-solid;
    }
    table {border:gold 5px solid; background-colorink;margin:right:10px;display:block;position:absolute;
    z-index:1;top:3px;margin-left:200px;width:500px;height:700px;padding-top:25px;padding-bottom:25px;}
    td {url{"spencer/Pictures/charlize.jpg") border:red 3px solid; background-color:white;width:25px;height:140px;
    }

    <body><img src="../Pictures/background2.jpg"; width="100% height="100%"><h1>Galllery</h1>
    <br><h2>ALL AREAS</h2><br><table><tr><td><a href="charlize.jpg><img src="../Pictures/charlize.jpg";width="251" height="140"></td><td>Imfine</td><td>img1</td><tr></table>

  2. #2
    Join Date
    Nov 2012
    Posts
    5
    There are some issues with your code.

    HTML Code:
    <body>
    <img src="../Pictures/background2.jpg"; width="100% height="100%">
    <h1>Galllery</h1>
    <br>
    <h2>ALL AREAS</h2>
    <br>
    <table>
    <tr>
    <td><a href="charlize.jpg><img src="../Pictures/charlize.jpg";width="251" height="140">
    </td>
    <td>Imfine</td>
    <td>img1</td>
    <tr>
    </table>
    You are missing the </a> tag at the end of your link. Are you also trying to make the image clickable so that when a user clicks on it it takes them to a new page with just the image? If that is so then you're URL source is not matching. The <a href="charlize.jpg><img src="../Pictures/charlize.jpg";width="251" height="140"> should have the same URL reference, either

    <a href="charlize.jpg><img src="charlize.jpg"; width="251" height="140">

    or

    <a href="../Pictures/charlize.jpg><img src="../Pictures/charlize.jpg"; width="251" height="140">

    I don't see the need to have the url parameter in the CSS along the td tag below. Also that url is different then the above two links.

    HTML Code:
    #container {display:block;postition:absolute;z-index;top:130px;border-solid;
    }
    table {border:gold 5px solid; background-colorink;margin:right:10px;display:block;position:absolute;
    z-index:1;top:3px;margin-left:200px;width:500px;height:700px;padding-top:25px;padding-bottom:25px;}
    td {url{"spencer/Pictures/charlize.jpg") border:red 3px solid; background-color:white;width:25px;height:140px;
    }
    What happens when you look at the webpage version, is it a little red checkbox where the image is supposed to be, or do you get a page error saying the file could not be found when you click on the image?

  3. #3
    Join Date
    Mar 2011
    Posts
    1,133
    Validate your code. Both the CSS and HTML you show have serious syntax errors.

    Try http://validator.w3.org/ and http://jigsaw.w3.org/css-validator/

    Seriously, guy. It's time to stop plugging in stuff you see around the web and learn the basics.
    Rick Trethewey
    Rainbo Design

  4. #4
    Join Date
    Apr 2012
    Posts
    110

    Thanks for that, Im learning the code at codeacadamy.com, but to put it in practice,

    Thanks, learning it at codeacadamy.com. but putting it into trial and practice, will have lots of problems. Hopefully will come right soon.

  5. #5
    Join Date
    Apr 2012
    Posts
    110

    Thanks Jethco will,, try that. Tried to validate, but says type in Url. but website i

    Went to validatorw3, but says type in url. Problem is, my website is just practice, there is no website on the web. only in my notepad++

  6. #6
    Join Date
    Nov 2012
    Posts
    5
    I'd recommend a better free program then notepad, it's called PS Pad Editor. It shows you the code in a much easier format.

    http://www.pspad.com/

    Again, I would like to help you but you have yet to answer my question from my OP.

    What happens when you look at the webpage version, is it a little red checkbox where the image is supposed to be, or do you get a page error saying the file could not be found when you click on the image?

    Answering the above can better troubleshoot what your issue is.

  7. #7
    Join Date
    Mar 2011
    Posts
    1,133
    The file doesn't need to be online. You can use the "Validate by File Upload" tab to upload your HTML and CSS files.
    Rick Trethewey
    Rainbo Design

  8. #8
    Join Date
    Apr 2012
    Posts
    110

    Oh, thanks. where do I find the validate by file upload tab. is it in notepad++

    Thanks, where do I find that tab.

  9. #9
    Join Date
    Apr 2012
    Posts
    110
    Thanks jtechno, the images are showing now, and the table is on the main page. Ill just save it for future reference.

  10. #10
    Join Date
    Mar 2011
    Posts
    1,133
    It's an option at http://validator.w3.org, not in your editor. You upload the file to the validator for processing instead of having it look for the file online.
    Rick Trethewey
    Rainbo Design

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles