473,385 Members | 1,782 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,385 software developers and data experts.

Image Positioning

I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation. Why is
ASP (or IE or Visual Studio) putting some spacing between the images? And
how do Iget rid of it? Thanks.

Jerry
Nov 19 '05 #1
5 1123
How are you laying them out, with tables or CSS?

"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation. Why is
ASP (or IE or Visual Studio) putting some spacing between the images? And
how do Iget rid of it? Thanks.

Jerry

Nov 19 '05 #2
WJ
"Jerry Camel" <rl*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation.


To achieve this technique, you will need to come up with a one single image
across the page, then assign "hot-spots" on the image. I know Front page is
famous for this trick.

John
Nov 19 '05 #3
Thats because each line break that separates your image tags in your
html code causes a space to be inserted. For example:
<img>
<img>

You have a couple of options:
1. You can put all the html code for your images on one line:
<img><img>
2. If it doesn't read well then you can do something like the
following:
<img
<img> or
<img><
img>
In this case the line break doesn't insert a space because its inside
the tag.

3. You can embed your images inside a table (my preference).
<table>
<tr>
<td><img></td>
<td><img></td>
</tr>
</table>
From what I remember from the W3C specs, line breaks are not supposed to be replaced with spaces. Its a behavior of the browser's
implementation of HTML that you have to live with.
mike
Jerry Camel wrote: I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation. Why is
ASP (or IE or Visual Studio) putting some spacing between the images? And
how do Iget rid of it? Thanks.

Jerry


Nov 19 '05 #4
That worked. Now, how do I get Visual Studio to stop screwing the my
formatting? I turned off the options for applying automatic formating, but
it still keeps messing with the way I format my HTML...

Thanks.

Jerry
<ms*****@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Thats because each line break that separates your image tags in your
html code causes a space to be inserted. For example:
<img>
<img>

You have a couple of options:
1. You can put all the html code for your images on one line:
<img><img>
2. If it doesn't read well then you can do something like the
following:
<img
<img>

or
<img><
img>
In this case the line break doesn't insert a space because its inside
the tag.

3. You can embed your images inside a table (my preference).
<table>
<tr>
<td><img></td>
<td><img></td>
</tr>
</table>
From what I remember from the W3C specs, line breaks are not supposed

to be replaced with spaces. Its a behavior of the browser's
implementation of HTML that you have to live with.
mike
Jerry Camel wrote:
I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation. Why is ASP (or IE or Visual Studio) putting some spacing between the images? And how do Iget rid of it? Thanks.

Jerry

Nov 19 '05 #5
Unfortunately, you're stuck with this behavior until the next release
of VS due out soon. At least that's what I recall.

Hindsight being 20/20, I'm kind of glad this problem exists because it
forced me to abandon the Designer and to rely exclusively upon my HTML
coding skills. It made me a better developer as a result.

If you must rely upon the Designer, then you will need to use the
<table> work-around. Just remember to set your cellpadding and
cellspacing attributes to 0.

mike

Jerry Camel wrote:
That worked. Now, how do I get Visual Studio to stop screwing the my
formatting? I turned off the options for applying automatic formating, but
it still keeps messing with the way I format my HTML...

Thanks.

Jerry
<ms*****@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Thats because each line break that separates your image tags in your
html code causes a space to be inserted. For example:
<img>
<img>

You have a couple of options:
1. You can put all the html code for your images on one line:
<img><img>
2. If it doesn't read well then you can do something like the
following:
<img
<img>

or
<img><
img>
In this case the line break doesn't insert a space because its inside
the tag.

3. You can embed your images inside a table (my preference).
<table>
<tr>
<td><img></td>
<td><img></td>
</tr>
</table>
From what I remember from the W3C specs, line breaks are not supposed

to be replaced with spaces. Its a behavior of the browser's
implementation of HTML that you have to live with.
mike
Jerry Camel wrote:
I'm trying to create a simple menu bar across the top of the page. It's
basically just a bunch of images stacked left to right. But the images
don't touch each other as they should for a seamless presentation. Why is ASP (or IE or Visual Studio) putting some spacing between the images? And how do Iget rid of it? Thanks.

Jerry


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anna | last post by:
Hi all. I hope this is the right group for my question. If not, please tell me, where can I ask this. I wrote a client-side image map, using <img>, <map> and <area> tags. I want to be able,...
6
by: Haines Brown | last post by:
I find that when I use list-style-image with galeon or mozilla, padding is inserted between the symbol image and the following list text, while under IE 5.0 it seems to be inserted before the image...
1
by: John Leeke | last post by:
How are images positioned on a page? In particular, how do I adapt the following javascript code: ********** <img src="officecam0000.jpg" name="myImageName"> <script language="JavaScript">...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
7
by: Doc | last post by:
I've read in a couple of different places including the archives of this forum that html doesn't allow you to precisely dictate the position of an image, but I found this command (again in the...
6
by: Jerry Camel | last post by:
I want to center an image on the screen and have text centered over the image. What's the best way to do this? I've been playing with style tags and I can get the stuff to center automatically...
3
by: Jason | last post by:
I don't usually use CSS positioning very much, but I thought that I understood the concept until I got into this one. The site is using a mixture of tables and CSS (to make sure it works well on...
3
by: seamlyne | last post by:
The first method I ever used for multiple state buttons was to create a graphic for each button for each state: AboutUs_on, AbooutUs_over, AboutUs_out, etc. That works great when there are just a...
5
by: mr. ambastha | last post by:
Hello, I have 4 large images ( 1024 x 1024). All four images constitute one large image when kept side by side. I want to show that larger image on a webpage with a smaller image area (say,...
3
by: vunet | last post by:
When I use image as a bullet within LI element I have different image positioning results in Firefox and IE6. IE6 puts the image on top and far from left LI's border. Firefox puts it nicely in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.