Linking Directly To A Pic In A Table

redrubies

Supreme Member
Joined
Jan 17, 2011
Messages
1,442
Reaction score
2,664
I think I screwed something up. If you have a table with rows of thumbnails, how do you link to one product in the table? Say you want to put a link on twitter of a pic in the second row of the table, third box. What is the code for the link to go directly to that pic? Thank you!
 
You can link directly to it, but it won't be very specific if there are 3 items in the row, it'll just put that row at the top of the page on load. The way you do it is as follows:

In your row where the pic is (in your example 2nd row, 3rd column) you'll have to anchor the image. So use this HTML:

Code:
<a name="pic2ndrow3rdcolumn"><img src="blah/blah/blah.jpg" alt="blah"></a>

You could wrap just the header of the field or whatever, but that is the anchor the browser will jump to. Now in your link on Twitter, you'll do this:

Code:
Hey guys, check out url/pagewithtable.html#pic2ndrow3rdcolumn

That will cause the browser to load the HTML and then jump to that anchor tag.
 
Code:
[URL]http://www.w3schools.com/tags/tag_img.asp[/URL]

Is this what you are looking for?
 
You can link directly to it, but it won't be very specific if there are 3 items in the row, it'll just put that row at the top of the page on load. The way you do it is as follows:

In your row where the pic is (in your example 2nd row, 3rd column) you'll have to anchor the image. So use this HTML:

Code:
<a name="pic2ndrow3rdcolumn"><img src="blah/blah/blah.jpg" alt="blah"></a>

You could wrap just the header of the field or whatever, but that is the anchor the browser will jump to. Now in your link on Twitter, you'll do this:

Code:
Hey guys, check out url/pagewithtable.html#pic2ndrow3rdcolumn

That will cause the browser to load the HTML and then jump to that anchor tag.

Oh! I got it now. Thank you!
 
Code:
w3schools

Is this what you are looking for?

No, that's not at all what they're asking. Also - w3schools is a horrible HTML reference;) They've gotten better over the past few years, but there are still tons of things that are outright wrong on there:)
 
No, that's not at all what they're asking. Also - w3schools is a horrible HTML reference;) They've gotten better over the past few years, but there are still tons of things that are outright wrong on there:)
I gave the same reference as you gave. The link has the same reference, <img src="asdfg" alt="asdfg">, and that's the start point from where you build the code (as you mentioned in your post). The site also has a easy "try the code yourself" on it which helps to build upon the basics, and so regardless of what you think of the site, it's still a good starting point for a beginner.

If you know any related site that's better for learners and has a facility to test code like the above site, then please give a reference to that on the forum, so that members like OP and even I can benefit from it.
 
Back
Top