Forum Moderators: not2easy

Message Too Old, No Replies

Positioning Images with <div>

         

svoltmer

6:49 pm on May 23, 2003 (gmt 0)

10+ Year Member



I am using the style " div {float:left;} to position a bunch of thumbnails, but I can't seem to get an even spacing on both sides of the rows made from the floating images. I am using "margin: 5px 5% 5px;" and I thought that would allways put 5% of the remaining page on either side of each image. but the right hand side of the frame is larger sometimes, depending on the # of images per row. Do you understand?

Take a look at: <stop it I'm going insane!>

You'll have to click the "Portfolio" link because I am using frames. Thanks!

[edited by: Nick_W at 6:59 pm (utc) on May 23, 2003]
[edit reason] no urls please [/edit]

Nick_W

9:11 am on May 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmmmm....

Perhaps some Simplified and Relevant [webmasterworld.com] code would be good here?

Can you post a little?

Nick

mipapage

1:27 pm on May 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am using "margin: 5px 5% 5px;" and I thought that would allways put 5% of the remaining page on either side of each image. but the right hand side of the frame is larger sometimes, depending on the # of images per row.

If I understand you correctly, I believe that you answered your own question.

By putting 5% as the margin-right, you are using a relative size - right? Try something more 'absolute'; pixels should do the trick.

If you want something concrete, you have to have something concrete there - by making both the number of images vary and the margin vary, your margin is then relative to the number of images. Put pixels in the margin and then you can have as many images as you want.

<covering my a..>I think this is right, I haven't tried it out...<covering />


Hilarious snip Nick! no offense svoltmer, I got snipped earlier too...