CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 22nd, 2002, 07:40 AM
B_man B_man is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Enschede, The Netherlands
Posts: 31 B_man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
position an image within a textblock with css

Is there a way to position an image 'absolute' in a textblock using css?

Reply With Quote
  #2  
Old September 22nd, 2002, 08:50 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
<html>
<head>
<title>untitled</title>
</head>
<body>
<div style="position:relative;font-size:24px;">
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<img style="position:absolute;left:0px;top:0px;" src="http://forums.devshed.com/images/devtitle.gif">
</div>
</body>
</html>

Keep in mind that absolute positioning removes the element from the document flow, putting it in its own plane above non-absolutely positioned content, with no space cleared for it. Maybe this is more like what you wanted(?):

<html>
<head>
<title>untitled</title>
</head>
<body>
<div style="position:relative;font-size:24px;">
<img style="position:relative;float:left;" src="http://forums.devshed.com/images/devtitle.gif">
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</div>
</body>
</html>

http://www.webreference.com/html/tutorial18/

Reply With Quote
  #3  
Old September 23rd, 2002, 02:21 AM
B_man B_man is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Enschede, The Netherlands
Posts: 31 B_man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yes, but I also want to give the image a left and top value. When I do this, the image is placed over the text.

Can I give the image a left and top value?

Reply With Quote
  #4  
Old September 23rd, 2002, 09:31 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10

<html>
<head>
<title>untitled</title>
<style type="text/css">

#box {
position: relative;
width: 570px;
font: 200 16px helvetica;
padding: 5px;
border: 1px black solid;
}

#pic {
position: relative;
float: left;
margin: 10px 26px 10px 17px;
border: 3px silver groove;
}

</style>
</head>
<body>
<div id="box">
<img id="pic" src="http://forums.devshed.com/images/devtitle.gif" />
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</div>
</body>
</html>

Reply With Quote
  #5  
Old September 24th, 2002, 03:19 AM
B_man B_man is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Enschede, The Netherlands
Posts: 31 B_man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yes, but when I change the left and top value of the pic with a script and it's placed over the text, this text should alter. Now the image floats over the text, while the text should float around it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > position an image within a textblock with css


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway