473,508 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bottom centering images

1 New Member
Hi guys, I need some help with this ...

I have 2 clickable images and I want them centered right next to each other, and on the bottom of the page, using CSS.

How should I do this? I can't seem to figure it out.

To clarify, this is the HTML (strict 1.0):

Expand|Select|Wrap|Line Numbers
  1. <div id="images">
  2. <a href="#"><img alt="one" src="one.gif" /></a><a href="#"><img alt="two" src="two.gif" /></a>
  3. </div>
Cheers!
Feb 5 '10 #1
1 1924
Atli
5,058 Recognized Expert Expert
Hey.

@Superflu
By which I assume you mean XHTML 1.0 strict? (The X makes a LOT of difference here)

Generally, to horizontally center something, you either use:
  • text-align: center - On block level elements to center their contents.
  • margin: 0 auto; - On block level elements to center themselves.
But that's the easy part.

If you want to pin it to the bottom, that gets a bit tougher. Do you want it fixed to the bottom of the window regardless of the size of the page (like the Facebook tools bar), or do you just want them trailing the content?

If it is the former, you would use position: fixed with bottom: 0px. If it is the latter... well, you just center it vertically and leave it at the end of the content in your HTML. - You can use JavaScript tricks to make it stick to the bottom when the window is higher than the content but to scroll down with it when the page grows. But that is beyond simple CSS rules. (At least as far as I know.)
Feb 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

18
4180
by: Heath | last post by:
Is it proper to center images in a <div> by using the text-align: center property? Or is there a better way?
10
66002
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274"...
5
2624
by: Robert J. O'Hara | last post by:
For some time I've made use of the max-width property in CSS to cause my pages to appear as a centered block against a contrasting background. This works well in new browsers (Mozilla, etc.) and...
3
4189
by: John Pote | last post by:
1. Horizontal centering a <divin browser window. The current trend seems to be to place page content in a fixed width area in the middle of the browser window. How is this achieved? If I use a...
16
3266
by: FuzzyLogik | last post by:
By width, I don't mean weight. I have a row of <li>'s, with a bottom-border. I want the bottom-border to only go 90% of the <li> (centered) Is there any way to do this? I have it in this...
2
3025
by: rudicheow | last post by:
SHORT VERSION ============= I have a bunch of identical fixed-size single-celled tables that rest against each other horizontally thanks to "float:left". These tables are dynamically generated...
1
5329
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web...
2
2217
by: tonsi | last post by:
I have a page but it wont center the div. Can anyone take a look at it and help. When I try to center in the body using text-align: center; it doesn't work with the main container (called Table_01)....
1
2271
by: =?Utf-8?B?ZnJhbmt5?= | last post by:
Hello, I've created a table that has two rows that are span across three columns. The third row has three columns, each with an image. The last row is also span accross three columns. The span...
4
5267
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be...
0
7223
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,...
0
7115
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...
1
7036
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...
0
7489
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...
0
5624
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,...
0
4705
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
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 ...
0
414
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...

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.