holmedwa04 Posted August 30, 2006 Share Posted August 30, 2006 Now, I know this sounds stupid, but I can't seem to valign an iamge in a table, this is the code:<table><tr><td align="center"><a href="mysite.html"><img src="mypic.gif"></a></td></tr></table>Can anyone help, I have already done the align one, just the valign im having trouble with. Link to comment Share on other sites More sharing options...
Cronthenoob Posted August 30, 2006 Share Posted August 30, 2006 in the <td> tag you should just be able to putvalign="top" valign="botton"orvalign="middle"Edit: accidently put center instead of middle. Link to comment Share on other sites More sharing options...
holmedwa04 Posted August 30, 2006 Author Share Posted August 30, 2006 in the <td> tag you should just be able to putvalign="top" valign="botton"orvalign="middle"Edit: accidently put center instead of middle.It doesn't seem to vertically center the image, is it because is is part of a link? Link to comment Share on other sites More sharing options...
Cronthenoob Posted August 30, 2006 Share Posted August 30, 2006 <td valign="middle">Should vertically center everything in that cell.Don't know why its not working Link to comment Share on other sites More sharing options...
holmedwa04 Posted August 30, 2006 Author Share Posted August 30, 2006 <td valign="middle">Should vertically center everything in that cell.Don't know why its not working No, it stiill doesn't seem to be working, is it because I am using align="center" aswell? Here is the code:<table border="1" width="100%"><tr><td align="center" valign="middle"><img src="logos/25translogo.gif"></td><td><img src="logos/40translogo.gif"></td><td><img src="logos/50translogo.gif"></td><td><img src="logos/60translogo.gif"></td></tr><tr><td bgcolor="gray"><img src="logos/25greylogo.gif"></td><td bgcolor="gray"><img src="logos/40greylogo.gif"></td><td bgcolor="gray"><img src="logos/50greylogo.gif"></td><td bgcolor="gray"><img src="logos/60greylogo.gif"></td></tr><tr><td bgcolor="black"><img src="logos/25blacklogo.gif"></td><td bgcolor="black"><img src="logos/40blacklogo.gif"></td><td bgcolor="black"><img src="logos/50blacklogo.gif"></td><td bgcolor="black"><img src="logos/60blacklogo.gif"></td></tr></table> Link to comment Share on other sites More sharing options...
holmedwa04 Posted August 30, 2006 Author Share Posted August 30, 2006 Its alright now, I think it was because I was linking to images that were not even there, and so when I made them, it aligned them correctly. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 30, 2006 Share Posted August 30, 2006 Left middle alignment is actually the default for a table. If you're ever in doubt, put a border around the image to be able to see for sure how big the gutters are. Link to comment Share on other sites More sharing options...
holmedwa04 Posted August 30, 2006 Author Share Posted August 30, 2006 Left middle alignment is actually the default for a table. If you're ever in doubt, put a border around the image to be able to see for sure how big the gutters are.I though valign was usually in the middle, but when the images were not linked, it showed the little crosses, and I thought that they might be in the middle, but they were not. Anyway I have fixed it now, and the slight problem with the colours is fixed now aswell. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now