473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

how to display images without gap

Hi!
im unable to make the images displayed beside each other wihtout gaps.

this is my code:
[html]
<table width=600 hight=800>
<tr>
<td>
<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>

<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>

<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>
</td></tr>
</table>
[/html]
but in the output the images have space inbetween. is there a way to put them without any space . thx
Oct 22 '07 #1
10 3342
drhowarddrfine
7,435 Expert 4TB
This happens because images are always inline, just like text, and create 'inline boxes'. So you have to simply change the property of the div to 'display:block'. The only problem is that block level elements occupy the full width of the page so 'float:left' will keep them on the same line.
Oct 23 '07 #2
This happens because images are always inline, just like text, and create 'inline boxes'. So you have to simply change the property of the div to 'display:block'. The only problem is that block level elements occupy the full width of the page so 'float:left' will keep them on the same line.

thx for ur help. it works for the top and bottom images, but the image on the horizontal level still have gabs. i don know how to resolve this.
Oct 23 '07 #3
drhowarddrfine
7,435 Expert 4TB
Well, it shouldn't, so post a link or your markup.
Oct 23 '07 #4
JamieHowarth0
533 Expert 512MB
Hi there,

Try using:
Expand|Select|Wrap|Line Numbers
  1. <table style="border:0px;padding:0px;margin:0px;">
  2.  
Normally works for me. Hope it helps!

Best regards,

medicineworker
Oct 23 '07 #5
Hi there,

Try using:
Expand|Select|Wrap|Line Numbers
  1. <table style="border:0px;padding:0px;margin:0px;">
  2.  
Normally works for me. Hope it helps!

Best regards,

medicineworker

thx for all ur help.
Oct 24 '07 #6
drhowarddrfine
7,435 Expert 4TB
Well, there you go, and me spouting off on the other stuff and not paying attention to the fact that the images are in a table. My advice applies to non-table images (not that I would ever lay a page out using tables :) ).
Oct 24 '07 #7
JamieHowarth0
533 Expert 512MB
Well, there you go, and me spouting off on the other stuff and not paying attention to the fact that the images are in a table. My advice applies to non-table images (not that I would ever lay a page out using tables :) ).
Lol - even the W3C Schools' website uses tables for layout (which technically isn't a conformity to their own WAIA standards, as you're really meant to use <div>'s - but everyone knows that... don't they... like I do on my website *cough* not *cough* 8-)).

medicineworker
Oct 24 '07 #8
drhowarddrfine
7,435 Expert 4TB
W3CSchools is in no way affiliated with the W3C.
Oct 24 '07 #9
JamieHowarth0
533 Expert 512MB
W3CSchools is in no way affiliated with the W3C.
My apologies, you are correct (W3 Schools is (c) Refsnes Data).
My boo-boo.

med
Oct 24 '07 #10
The reason as mentioned above (as I recently found out) is because you have your linked images on separate lines of the HTML. Put them all on the same line w/out the breaks in the code. OR you can use display:inline for the img.
Feb 13 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mamatha | last post by:
Hi I am developing a small application to capture a record a video file through webcam in C#.NET. In this application i created a JPEG images for every slide,means every JPEG image was treated...
5
by: Yoramo | last post by:
Hello is it possible to display images on a ASPX without having them on the disk of the server ? I have images in a DB and whould like to display them on a web page. writing them to disk...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
2
by: Evan M. | last post by:
Hello there, I have an interesting problem to takle. I'm creating a website that's going to be run in a local Intranet. The site uses a MasterPage / content page scheme, with the Master page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.