tedster

msg:4113111 | 6:26 pm on Apr 9, 2010 (gmt 0) |
Hello and welcome to the forums. There are many possible approaches. Try playing with the extra attribute style="float:left" for the image elements that you want to keep on the same line.
|
rocknbil

msg:4113160 | 7:45 pm on Apr 9, 2010 (gmt 0) |
First, this code is horribly broken. Look how you are starting a series of div's, but have no </div> Second, align is deprecated, and you have no alt attribute on your images. | the image will be align in 5 columns and 5 or more in rows |
| This is going to be tough if you don't know the widths of the images, but let's say they are 100px wide for all. <style type="text/css"> .img-row { text-align: center; min-width: 512px; margin:auto; } img-row img { float: left; margin-right: 2px; } </style> .... <div class="img-row"> <a href="LINK 1"><img src="IMAGE 1" alt="1"></a> <a href="LINK 2"><img src="IMAGE 2" alt="2"></a> <a href="LINK 3"><img src="IMAGE 3" alt="3"></a> <a href="LINK 4"><img src="IMAGE 4" alt="4"></a> <a href="LINK 5"><img src="IMAGE 5" alt="5"></a> </div>
|
OPunWide

msg:4113165 | 7:52 pm on Apr 9, 2010 (gmt 0) |
I suggest you do some reading up on xhtml and CSS. The code that you posted is very obsolete. As a minimum, this:
<DIV ALIGN=CENTER><a href="LINK 1"><img src="IMAGE 1"></a> <a href="LINK 2"><img src="IMAGE 2"></a> should be this:
<div style="text-align: center"><a href="LINK 1"><img src="IMAGE 1" /></a> <a href="LINK 2"><img src="IMAGE 2" /></a></div> Note the closing tags for each element, including the img element. I'm not sure what you're trying to achieve. Is it 5 columns that don't change when the browser window gets smaller? You can do that if you know the size of the images by setting the width of the surrounding div. Google CSS width, or something similar.
|
tedster

msg:4113189 | 8:39 pm on Apr 9, 2010 (gmt 0) |
I hope I don't confuse m4zt3r with this comment, but some elements such as <img> are only take closing tags if you are writing XHTML. <img /> is not valid in HTML.
|
m4zt3r

msg:4113579 | 3:53 pm on Apr 10, 2010 (gmt 0) |
IM VERY GLAD I FOUND THIS KIND OF SITE AND IM THANKFUL TO ADMIN TEDSTER and all MODS...And asking permission to ask and ask what i want to learn about webdesign?DO I CAN OPEN A TOPIC ABOUT MY PROBLEM EVEN HAVE BEEN POSTED BEFORE?...we have no search bar here to find topics related with my problem!so hope no one banned me opening a lot of topics if ever... TNX a lot again and more power!
|
tedster

msg:4113580 | 3:59 pm on Apr 10, 2010 (gmt 0) |
Well, definitely try Site Search [webmasterworld.com] first. There's a link to "search" in the small text that is lined up at the top of each screen. If you don't find an answer that way, since you are just beginning to learn HTML you might find our New To Web Development [webmasterworld.com] forum is a good place for basic questions.
|
m4zt3r

msg:4113593 | 4:46 pm on Apr 10, 2010 (gmt 0) |
yes i found it, sorry! ive tried this code,
<style type="text/css"> .img-row { text-align: center; min-width: 512px; margin:auto; } img-row img { float: left; margin-right: 2px; } </style> <div class="img-row"> <a href="LINK 1"><img src="IMAGE 1" alt="1"></a> <a href="LINK 2"><img src="IMAGE 2" alt="2"></a> <a href="LINK 3"><img src="IMAGE 3" alt="3"></a> <a href="LINK 4"><img src="IMAGE 4" alt="4"></a> <a href="LINK 5"><img src="IMAGE 5" alt="5"></a> </div> if i maximized the page its ok but if i will adjust the page to smaller still the image will b broken, another question is how do i do it for the second and 3rd rows of image?
|
omegaman66

msg:4117569 | 5:34 am on Apr 18, 2010 (gmt 0) |
You could put this all in tables. I can hear the gasp of horror now. But it works.
|
piatkow

msg:4118120 | 2:26 pm on Apr 19, 2010 (gmt 0) |
I have a sudden image of Monty Python characters pretending to be women in false beards shouting "he said tables" and throwing stones at you. Seriously, if you aren't bothered about the "purity" of your coding it is probably the easiest and simplest solution.
|
|