Sarqen Posted January 8, 2006 Share Posted January 8, 2006 I'm having some problems with the image tag, here's the source code: <html><head><style type="text/css"><!--body {background-color: #0b4143;} #layoutable {border: 0px;}#topend {border-top: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;}#banner {border-right: 1px solid black;border-left: 1px solid black;}//--></style></head><body><table id="layoutable" cellpadding="0" cellspacing="0"><tr><td><img src="images/top_end.jpg" id="topend" width="700px" height="35px"></tr></td><tr><td><img src="images/banner.jpg" id="banner" width="100px" height="100px"></tr></td></table></body></html> I want to display one image dierctly above another using the rows of a table.I added the images into the table, so far it looks ok, then I set the cell spacing, cell padding and border to 0. I then displayed the page in IE (fully updated) and there was a space between the bottom of the images and the bottom of each of the cells of the table. I tried resetting the margin, padding, and border of the image and nothing happened. I even tried displaying it in the AOL browser. Any ideas on how I can remove the space between the images and the bottom of the cells? Link to comment Share on other sites More sharing options...
Skemcin Posted January 9, 2006 Share Posted January 9, 2006 in the <img> tags, you do not need the "px" defined - thats just CSS. Add a <br> tag after the image. That will make sure the browser knows you are all done with the line.Try that and let me know.You could also set the hspace="0" to be sure, but that won't make a difference. Link to comment Share on other sites More sharing options...
Sarqen Posted January 9, 2006 Author Share Posted January 9, 2006 I asked a friend about my problem just after I made this post and he said I should set the image as the background of the cell, which works. But thanks, I'll try your way as an alternate solution. Link to comment Share on other sites More sharing options...
~Shinta Posted January 9, 2006 Share Posted January 9, 2006 Are you sure a background-image is what you were trying to accomplish? 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