Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Image position issue

Image position issue

Reply
  #1 (permalink)  
Old 09-24-09, 07:29 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 648
Thanks: 0
Thanked 0 Times in 0 Posts
Image position issue

Hi there...

i got this issue:

on my site there is a div with text in it and a div with an image..

Now I want to image at the right-bottom "corner" of the text div
with the text floating around above and at the left of the image.

I attached an example image..

_j
Attached Images
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-24-09, 08:17 AM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 2,333
Thanks: 17
Thanked 92 Times in 90 Posts
Try vertical-align:bottom and float:right on the image div.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-24-09, 08:23 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 648
Thanks: 0
Thanked 0 Times in 0 Posts
nope.. the image div is floating to the right, but it's below all the text.. and not next to the text..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-24-09, 08:26 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 7,572
Thanks: 5
Thanked 27 Times in 24 Posts
Can you post your code?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 09-24-09, 08:30 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 648
Thanks: 0
Thanked 0 Times in 0 Posts
sure i can..

HTML Code:
<div id="verhaal" style="border:0px solid #ff00ff;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum 
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim 
qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.<div style="float:right; vertical-align:bottom; width:100px; height:100px; background-color:#ffffff;"></div>
</div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 09-24-09, 08:46 PM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 2,333
Thanks: 17
Thanked 92 Times in 90 Posts
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 09-25-09, 02:44 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 648
Thanks: 0
Thanked 0 Times in 0 Posts
i'll take a look..

the solution is in there? or is this something to consider and see if it works??..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 09-25-09, 06:26 AM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 2,333
Thanks: 17
Thanked 92 Times in 90 Posts
I think the solution is there, you need to figure out the best approach.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 09-26-09, 11:52 PM
haroldq haroldq is offline
New Member
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Are you using Wordpress? If you are, you can just drag the image to area you like and the text will simply flow around it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 10-08-09, 10:51 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 2,726
Thanks: 0
Thanked 32 Times in 32 Posts
Wrapping text around an image may seem simple at first glance.
Align the image left or right and apply the text.

But to get the image exactly where you want it is not as simple as it seems.

You want the image to end up at the bottom right with the text flowing around it.
That is fairly simple unless the text is changed often.
There is also the problem with the way different browsers display the text and the image.

Lets take an example:
We will use the code you posted.
The only thing is, you didn't specify the width of the outer div.
So I will give it a width of 300px just for this example.

Now if we specify the image div first and then the text,
the text will wrap itself around the div with the div being at the top of the page, aligned either left or right (float:left or float:right).
Now this is important to understand, because we want the image div to be at the bottom right.
So you need to know how much text will be able to occupy the space to the left of the image div without wrapping itself around the bottom of the image.
This text goes after the image div and the rest of the text goes before the image div.
HTML Code:
<div id="verhaal" style="width:300px;text-align:justify;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum
iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore
<div style="width:100px;height:100px;float:right;margin-top:5px;margin-left:5px;"><img src="" width="100px" height="100px"></div>
eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim
qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</div>
__________________
Jerry Broughton

Last edited by job0107; 10-08-09 at 11:05 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MYSQL Same Table Ishmell PHP 7 06-28-09 11:36 PM
div css theighost CSS 11 09-14-08 02:30 AM
displaying text over image ketanco CSS 10 09-11-08 07:39 PM
Image > click on it > position registrated > add things to the image Oskare100 PHP 2 05-23-06 08:59 AM
mouse click position on the image mirzao JavaScript 1 10-24-05 03:25 PM


All times are GMT -5. The time now is 11:17 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.