Carriage Returns grrr
- Started
- Last post
- 13 Responses
- Redmond
Why are they accounted for as one space between pictures? I've set margins and borders to 0px on everything, yet if I just have a carriage return anywhere between 2 pictures it separates them by one space.
Is there a way around this?
- Redmond0
More clearly!
Why does the browser creates a huge space between images when I use a carriage return between 2 img tags. It's driving me nuts!
Let's say I have 60 thumbnails, I don't want to type-out all that info in a single line, yet if I break it, the end-result is a small space between those 2 pictures.
- DeLeon0
Can you post your html code?
- fuzzygroove0
easy solution is to use tables.
another solution is to use CSS
both will solve the weirdness!
- Redmond0
http://www.martinredmond.com/Nou…
Table one is what I'd want to achieve without having to rearrange the whole table code everytime I want to add a new picture to the stack. The second one is the carriage space effect. The third one is the same as the above without any carriage returns.
Idealy, I could just set-up the width of the table (in css) at 240px, just enter a series of 24X24px images into a td and have the browser stack them automaticaly next to one another into rows of 10.
But it doesn't work like that on the interweb!
- 0200
Have you tried using a instead? As in using a tag in the surce code between the two images.
- unknown0
why not write a loop in PHP or something and save yourself some serious hassle.
- DeLeon0
Isn't the 3rd table doing what you wanted to do? There are no spaces around the images (in Mozilla).
Or, you could do like chewbacca said, define an array of your images in PHP and loop through it, inserting tds, creating trs etc automatically.
- enobrev0
i agree that ie's decision to put spaces in is shitty
here.. cleaned it up a bit and i think i got what you wanted.. worked on the latest mozilla, ie and opera for me
- Redmond0
Hurray! Thanks! I finaly just figured-out that if you chose "Word Wrap" under "Format" in Notepad. It keeps notepad from scrolling on forever and solved it all. While the browsers seem to think it's one continuous line. Those poor fools! man I am tired.
You are all really kind. Thanks again :]
- enobrev0
so did my version not work for you? (so i know for future reference)
- unknown0
whoah... you are seriously hand-editing this stuff? Are you magically posting from 1994?
- Redmond0
I'm posting from broke-ho-city chewie. And besides, I like working in notepad better.
Enobrev, thanks! Though it seems it put the extra space beneath the pics now... But I didn't know you could write css that way so I learned something, Thanks!
Also, I should check out php, but don't you need microsoft access database maker something to create the data?
- unknown0
i wasn't dissing notepad, I was just floored that your were putting a bunch of images on the page using straight HTML.
PHP/ASP/CF/WTF can read the contents of a directory, so you don't need a database. Your life would be soooooo much easier if you wrote a loop to walk through an array of your image file names and print some HTML. You could solve your spacing issue in one line of code, not 500 lines.