473,803 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Move image1.jpg leftmost and imag2e.jpg rightmost on a page???

On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border)
and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border).

How do I code this in HTML resp. CSS?

If the user shrinks the browser window to a size which is smaller than the sum of the size
of the two images image1.jpg + image2.jpg then all browser tend to position these pictures
vertically. But: I don't want a "line wrap". If the horizontal size doesn't fit then
the right picture image.jpg should be truncated.

Is there a solution for this?

Jason

Jul 20 '05 #1
2 3262
Jason Stacy wrote:
On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border)
and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border).

How do I code this in HTML resp. CSS?

If the user shrinks the browser window to a size which is smaller than the sum of the size
of the two images image1.jpg + image2.jpg then all browser tend to position these pictures
vertically. But: I don't want a "line wrap". If the horizontal size doesn't fit then
the right picture image.jpg should be truncated.

Is there a solution for this?


Absolute positioning.

<div style="position : absolute; top: 0; right: 0; width: 200px;"><img
src="..."></div>
<div style="position : absolute; top: 0; left: 0; width: 200px;"><img
src="..."></div>

should do it (untested) for 200px-wide images. Of course, style
information should be in a separate style sheet rather than inline.

Note that I put the right image first in the source, to achieve your
requirement that it goes "under" the left image - I presume that's what
you intend when you say "truncate".

If you want these to be relative to a containing element rather than the
browser window, put them inside a <div> with position: relative set.

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #2
Ivo
"Jason Stacy" <jj*****@yahoo. net> wrote in message
news:ce******** *****@news.t-online.com...
On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border) and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border).
How do I code this in HTML resp. CSS?

If the user shrinks the browser window to a size which is smaller than the sum of the size of the two images image1.jpg + image2.jpg then all browser tend to position these pictures vertically. But: I don't want a "line wrap". If the horizontal size doesn't fit then the right picture image.jpg should be truncated.


There are many ways to do this using CSS. One possibility is this:
[quote cite=http://www.vansandick. com/archief/]
<div>
<img src="CI2a.jpg" alt="label" id="label" width="560" height="340"
border="0"
style="position :absolute">
<img src="CI7.jpg" alt="label" id="label" width="900" height="340"
border="0"
style="float:ri ght">
</div>
[/quote]

--
Iv
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7243
by: Sandra Setz | last post by:
Hi, I was wondering if someone could explain to me what the difference is between the width propery of the picture property of an image and the width property of the image itself. I would have guessed that when the stretch property of an image was set to false and an image was assigned to the picture property, that Image1.Picture.Width and Image1.width would be the same. This is not the case.
3
10470
by: Sandra Setz | last post by:
Hi, Is it possible to assign the Picture property of a picturebox to the Picture property of an image control? I use an invisble picturebox to make some changes to a picture, but I want to show the picture in an imagecontrol, since the image is very large and I want to stretch it. But when I execute the following code:
0
519
by: Jason Stacy | last post by:
On a webpage I would like to move image1.jpg as left as possible (directly to the browser window left border) and - simultaneously - the picture image2.jpg to the rightmost (directly to the right browser window border). How do I code this in HTML resp. CSS? If the user shrinks the browser window to a size which is smaller than the sum of the size of the two images image1.jpg + image2.jpg then all browser tend to position these pictures...
6
15818
by: Prakash | last post by:
Hi !! In a Continuous Form with say 10 records, I'd like to have 1 button with an "UP" Arrow & another button with a "DOWN" arrow. By pressing either the Up or the Down Arrow, I'd like the user to be able to MOVE the records up or down the order. Something like in a WinAmp or MusicMatch Playlist. A little sample code would be much appreciated.
8
2391
by: Ron Vecchi | last post by:
I know this has been asked before but I out of all the posts I've read regarding using Directory.Move and then the application restarting itself I have found no answer except that Sessions are buggy or that you should create a new folder then copy the content of the old into it and then delete the old one...pretty lame for such a simple IO action. Can microsoft give an answer to how to fix this or is this just a know bug... that will...
3
1246
by: Nathan Sokalski | last post by:
I am using GDI+ to generate buttons in my application. Because I want the left and right edges of the buttons to be a certain number of pixels from the start and end of the text, I need to know (or be able to calculate) the left and rightmost pixels of the text. However, this is a problem because not all letters have their leftmost pixel at the same X position. For example, when using the following font: Dim buttonfont As New...
6
1513
by: Dave | last post by:
How can I determine if the two rightmost elements of my string are ." ? Obviously, vb.net has a special use for the double-quote character, so how do I account for that. I have... if microsoft.visualbasic.right(mystring, 2) = ??????? Then
55
3649
by: indhu | last post by:
HI all one sequence has many panels. when i select combo it displays all the fields but panel has more rows. i want to view that also. how to do that? move next and previous commds are there but not working. pls help me with coding here goes my coding
3
3824
by: rkhurana | last post by:
Hi I am writing a JSF application that uses some third party charts. While I can see the chart but the javascript that is supposed to calla function to update chart periodically has a problem. It reports the error in the console - "document.getElementById("image1") has no properties". Pls advice. thanks rupak <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="1.2" ...> ...
3
1297
by: hantechs | last post by:
Hi, all I found I can get the img element named with "image1" in a html by using "document.image1" with javascript. It's very convenient because I don't need to use the long method like getElementByName etc. I wonder if this approach is the part of the DOM? I have checked the DOM specification, but found nothing. Can somebody give me clue? Thanks. Regards.
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.