473,667 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Photo "Collage" via absolute positioning. Centered???

We have a band web site. Here's the site now:

http://www.risky-biz.com

The home page has a "collage" of photos of the members of the band.
The collage is actually one .gif image that I put together. But now
we've added a ninth band member so I have to change it completely. On
top of that, some of the guys have wanted their photos changed in the
past.

I'd like to use CSS to position 9 separate photos when I redo it. This
will allow me to change it a lot more easily in the future. I'm pretty
sure I can figure out how to do it, by creating 9 separate IDs to
place the photos. In the present home page, there are "shadows" behind
the pictures, which I like. I imagine that even that is possible,
using images that are just shadows set to a lower z-index.

But how can I center the whole collage in the browser window? If I use
percentages, I can center it, but the arrangement changes with the
browser width. If I use pixel positioning, I can get the collage the
way I want it, but it will be some fixed distance from the left edge,
rather than centered.

I figure that I can encase the whole thing in a table and center that.
Is there another way?

Greg Guarino
Jul 21 '05 #1
3 6842
Put your collage in a div and position the images in a div and center
the div. But be careful, you can't position the images absolute if the
div isn't. you'll have to use negative margins i think.

Maybe this is also interesting for you:
http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html

Chris

Greg G wrote:
We have a band web site. Here's the site now:

http://www.risky-biz.com

The home page has a "collage" of photos of the members of the band.
The collage is actually one .gif image that I put together. But now
we've added a ninth band member so I have to change it completely. On
top of that, some of the guys have wanted their photos changed in the
past.

I'd like to use CSS to position 9 separate photos when I redo it. This
will allow me to change it a lot more easily in the future. I'm pretty
sure I can figure out how to do it, by creating 9 separate IDs to
place the photos. In the present home page, there are "shadows" behind
the pictures, which I like. I imagine that even that is possible,
using images that are just shadows set to a lower z-index.

But how can I center the whole collage in the browser window? If I use
percentages, I can center it, but the arrangement changes with the
browser width. If I use pixel positioning, I can get the collage the
way I want it, but it will be some fixed distance from the left edge,
rather than centered.

I figure that I can encase the whole thing in a table and center that.
Is there another way?

Greg Guarino

Jul 21 '05 #2
Greg G wrote:
We have a band web site. Here's the site now:

http://www.risky-biz.com

The home page has a "collage" of photos of the members of the band.
The collage is actually one .gif image that I put together. But now
we've added a ninth band member so I have to change it completely. On
top of that, some of the guys have wanted their photos changed in the
past.

I'd like to use CSS to position 9 separate photos when I redo it. This
will allow me to change it a lot more easily in the future. I'm pretty
sure I can figure out how to do it, by creating 9 separate IDs to
place the photos. In the present home page, there are "shadows" behind
the pictures, which I like. I imagine that even that is possible,
using images that are just shadows set to a lower z-index.

But how can I center the whole collage in the browser window? If I use
percentages, I can center it, but the arrangement changes with the
browser width. If I use pixel positioning, I can get the collage the
way I want it, but it will be some fixed distance from the left edge,
rather than centered.

I figure that I can encase the whole thing in a table and center that.
Is there another way?

Greg Guarino


1st: use .jpg for fotos.
2nd: you would save yourself lots of headaches when you would stick to
the complete-collage.jpg idea. there are many graphical prgrams nowadays
that come for little or no money which allow you to store a collection
of pictures and filters as 1 file (that you can edit, change whenever
you like, and export as 1 jpg. (try Paint.NET = free, simple, very good)

sorry for the discouraging story, but i think your plan is just not the
best approach.

gl
martin
Jul 21 '05 #3
<div style="margin-left: auto; margin-right: auto;
width: 350px; height: 265px;
position: relative;">
<img src="p1.jpeg" style="position : absolute; left=32px; top=64px;">
<img src="p2.jpeg" style="position : absolute; left=99px; top=21px;">
</div>
margin-left and right auto on the div does the centering.
Putting position: relative on the div makes the absolutely-positioned
imgs relative to it, not to the document.

--Phil.

Jul 21 '05 #4

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

Similar topics

2
1676
by: cosmo_canuck | last post by:
Hi all! I'm a web designer who's valiantly struggling, with occasional moments of triumph, to build my first fully CSS site. Hope that you can answer a couple of quick newbie questions. Page: http://adamabrams.com/tnd/spaprofits/hometest.html CSS: http://adamabrams.com/tnd/spaprofits/voknew.css Two issues right now:
0
8458
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
8366
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
8888
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
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8565
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8650
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
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...
1
2779
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
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.