/    Sign up×
Community /Pin to ProfileBookmark

dont want images to change position on resize

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>

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Apr 16.2003 — use style sheets to position your images at an absolute point.

left:XXpt;

top:XXpt;

Cheers

Khalid
Copy linkTweet thisAlerts:
@web-eagleApr 16.2003 — 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>

[i]PS. Don’t let the CSS Nazis know where you heard this![/i]?
Copy linkTweet thisAlerts:
@jeffmottApr 17.2003 — 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.[size=2]&lt;div style="background-image: url('images/logo_right.gif')"&gt;&lt;img src="images/logo.gif" alt=""&gt;&lt;/div&gt;[/size]
Copy linkTweet thisAlerts:
@web-eagleApr 17.2003 — 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.
Copy linkTweet thisAlerts:
@simon_gillauthorApr 17.2003 — 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!
Copy linkTweet thisAlerts:
@jeffmottApr 17.2003 — [b]I did have to add the align=”left” to keep it from centering[/b][/quote]Normally 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.[size=2]&lt;div style="background-image: url('images/logo_right.gif'); text-align: left"&gt;&lt;img src="images/logo.gif" alt=""&gt;&lt;/div&gt;[/size]
×

Success!

Help @simon_gill spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...