Log In · Register

 
Centering images
novemberwind
post Aug 3 2007, 02:00 PM
Post #1


I scream at men with pink shirts.
****

Group: Member
Posts: 169
Joined: Oct 2004
Member No: 58,653



This is kind of weird, and I don't know quite how to phrase it.

I have a layout that I want RIGHT in the middle of the page. My first attempt ended up like this: Here.

I've changed the layout, and I know how to center stuff HORIZONTALLY (of course), but I also want it centered VERTICALLY no matter what size the browser is. Is that possible with more than just an image (say, with several images and an iFrame put on top of the images?)

Not sure if that makes sense, but I hope someone replies soon _unsure.gif
 
 
Start new topic
Replies
novemberwind
post Aug 3 2007, 02:19 PM
Post #2


I scream at men with pink shirts.
****

Group: Member
Posts: 169
Joined: Oct 2004
Member No: 58,653



Well, I got SOMETHING working.

This is an abbreviated version of my code, involving only the elements that deal with vertical centering:

CODE
<HTML>
<head>
<style type="text/css">
div#centered { border: 0; height: 50%; width: 50%;
position: absolute; left: 25%; top: 25%; }
</style>

</HEAD>
<BODY background="http://img176.imageshack.us/img176/6640/bgenterfv6.jpg">
<center>
<div id="centered">
<img src="http://img245.imageshack.us/img245/7481/entertopleftnp8.gif"><img src="http://img177.imageshack.us/img177/9003/entertopmiddleno5.jpg"><img src="http://img184.imageshack.us/img184/1107/entertoprightlq1.gif"><br>
<img name="enter_middle" src="http://img520.imageshack.us/img520/8884/entermiddlegl5.jpg" width="550" height="280" border="0" id="enter_middle" usemap="#m_enter_middle" alt="" /><br>
<img src="http://img177.imageshack.us/img177/5096/enterbottomleftwu5.gif"><img src="http://img522.imageshack.us/img522/4106/enterbottommiddlesp4.jpg"><img src="http://img245.imageshack.us/img245/2968/enterbottomrightev7.gif">
</div>
</center>
</body>
</html>


My problem is that with this kind of method, if the window gets to small, the images don't stay side by side anymore D:
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: