image positioning usind div container

This is a discussion on "image positioning usind div container" within the Web Page Design section. This forum, and the thread "image positioning usind div container are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old May 24th, 2007, 10:53
New Member
Join Date: Apr 2007
Location: india
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
image positioning usind div container

hi,

I have four images and it should be placed in the four corners of the page. I like show a text in the middle when i make a mouseover on each image.. I found that div tag with container can be used...

Code: Select all
<html> 
<head> 
<style type="text/css"> 
div.container  
{ position:relative; } 
img.positioned  { position:absolute; height:63px; width:122px; } 
img#topleft     { top:0;    left:0; } 
img#topright    { top:0;    right:0; } 
img#bottomleft  { bottom:0; left:0; } 
img#bottomright { bottom:0; right:0; } 
 
</style> 
</head> 
<body> 
<div class="container"> 
<img src="img1.gif" class="positioned" id="topleft"> 
<img src="img2.gif" class="positioned" id="topright"> 
<img src="img3.gif" class="positioned" id="bottomleft"> 
<img src="img4.gif" class="positioned" id="bottomright"> 
 
</div> 
 
</body> 
<html>
The above code shows the image at top right and left but not in bottom.. I dont know why... I expect some ideas....

gemguy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 24th, 2007, 11:29
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: image positioning usind div container

It's an IE bug. As I recall, using left: 100% with a negative margin works. Not sure about vertically, though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 24th, 2007, 12:45
New Member
Join Date: Apr 2007
Location: india
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: image positioning usind div container

Hi ryan,

But Im working with firefox only... still the problems persists

gemguy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 24th, 2007, 13:04
Junior Member
Join Date: May 2007
Location: NW, UK
Age: 19
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: image positioning usind div container

I suggest this code:

Code: Select all
<html> 
<head> 
<style type="text/css"> 
div.container  { position:relative; height: 100%; width: 100%;} 
#topleft     { position:absolute; top:0;    left:0; } 
#topright    { position:absolute; top:0;    right:0; } 
#bottomleft  { position:absolute; bottom:0; left:0; } 
#bottomright { position:absolute; bottom:0; right:0; } 
 
</style> 
</head> 
<body> 
<div class="container"> 
<div id="topleft"><img src="img1.gif"></div>
<div id="topright"><img src="img2.gif"></div>
<div id="bottomleft"><img src="img3.gif"></div>
<div id="bottomright"><img src="img4.gif"></div> 

</div> 
 
</body>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 25th, 2007, 04:22
New Member
Join Date: Apr 2007
Location: india
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: image positioning usind div container

Hi chris,

Its working fine now... thanks for your help

gemguy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 25th, 2007, 08:04
Junior Member
Join Date: May 2007
Location: NW, UK
Age: 19
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: image positioning usind div container

Excellent

Glad I was a help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
image positioning

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image positioning and differences in IE/FF 0413 Web Page Design 33 Sep 25th, 2007 21:19
CSS positioning help - relative to background image sj2as Web Page Design 1 Sep 12th, 2007 01:27
Positioning an image with a link pregnantNproud Web Page Design 8 Aug 12th, 2007 01:33
Problem with image positioning Marc Web Page Design 1 May 31st, 2007 18:17
Positioning image absolutely timmytots Web Page Design 1 Jan 10th, 2006 02:27


All times are GMT. The time now is 23:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42