Click to See Complete Forum and Search --> : dont want images to change position on resize


simon_gill
04-16-2003, 11:24 AM
I have 2 images side by side, the left being a logo, and the right being a 1pixel wide image which I have stretched to 910pixels. My problem is when you resize the page, the second images will automatically move below the first image. This cannot happen, they cant move on resize.

This is the code, its pretty simple stuff but I dont know how to do this.

<img src=images/logo.gif border=0><img src=images/logo_right.gif width=910 height=120 border=0>

khalidali63
04-16-2003, 11:55 AM
use style sheets to position your images at an absolute point.

left:XXpt;
top:XXpt;

Cheers

Khalid

web-eagle
04-16-2003, 03:45 PM
Sounds like you’re trying to create a “background” to the right of the logo. I know I’m going to get my chops busted for this, but I’m a pragmatist. H*ck, I’d use duct tape if it would stick to my programs.

Why not create a 1x1 table, width=”100%”, put your logo in the single cell, aligned left, and use your 1 pixel wide gif as a background image in the cell. It’ll tile for the entire width of the cell, which should be 100% of whatever size the page appears.

Your finished table might look something like this:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" background="images/logo_right.gif"><img src="images/logo.gif" width="120" height="120"></td>
</tr>
</table>

PS. Don’t let the CSS Nazis know where you heard this!:D

jeffmott
04-16-2003, 08:23 PM
web-eagle's idea is good but, yes, they didn't use CSS :)
Since we really don't have any tabled data, using a table makes no sense to the structure of the document.<div style="background-image: url('images/logo_right.gif')"><img src="images/logo.gif" alt=""></div>

web-eagle
04-16-2003, 10:29 PM
Yeah, that’s good too….:(


Seriously, you’ve just taught me something (obviously).
I did have to add the align=”left” to keep it from centering.

<div align="left" style="background-image: url('images/logo_right.gif')"><img src="images/logo.gif" alt=""></div>

But it works as advertised, and it’s much neater than mine.

Thank You.

simon_gill
04-16-2003, 10:54 PM
cheers for that guys, a huge help!

yeh ive gotta admit, im not the biggest fan of CSS, but then again I dont know a great deal about them.

thanks again!

jeffmott
04-16-2003, 11:03 PM
I did have to add the align=”left” to keep it from centeringNormally it shouldn't center by default, so I'm assuming you have it within another block level elements that is centered. Either way, text alignment is also a purely stylistic issue (whether it's left, right, center, or justified doesn't change the content) and thus should done with styles.<div style="background-image: url('images/logo_right.gif'); text-align: left"><img src="images/logo.gif" alt=""></div>