Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-18-2011, 07:18 PM   PM User | #1
hallows
New to the CF scene

 
Join Date: Jul 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
hallows is an unknown quantity at this point
Adding a scrolling text bar over a picture.

I have been working on a guild for neopets, and as a beginner to coding I was stumped when my text box went below my picture not on it. Can someone tell me how to put it on the picture please?
hallows is offline   Reply With Quote
Old 07-18-2011, 07:27 PM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<style>
			* { margin: 0; padding: 0; }
			
			.comment {
				position: relative;
				background-color: #F4F4F4; 
				width: 302px;
				height: 132px;
				margin: 20px auto;
				z-index: 0;
			}
			
			.comment * {
				font-family: Arial, Helvetica, sans-serif;
			}
			
			.comment textarea.cgi {
				width: 300px;
				height: 130px;
				z-index: 2;
				background-color: transparent;
				border: #BBB 1px solid;
			}
			
			.comment textarea.cgi + img {
				position: absolute;
				top: 1px;
				left: 1px;
				z-index: -1;
				width: 160px;
				height: 120px;
                                border: 1px solid;
			}
		</style>
	</head>
	<body>
		<div class="comment">
			<textarea class="cgi"></textarea> 	
			<img src=""/>					
		</div>
	</body>
</html>
fixed. i really hope this is what you were asking for lol

doesn't work in ie7 or 8. gonna have to use an
<!--[if IE 7]><![endif]-->

not really sure if their is a universal way to position things behind like this. if there is, i would be very interested in learning how

Last edited by Sammy12; 07-18-2011 at 08:02 PM..
Sammy12 is offline   Reply With Quote
Old 07-18-2011, 08:04 PM   PM User | #3
hallows
New to the CF scene

 
Join Date: Jul 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
hallows is an unknown quantity at this point
the neopets site wont allow it so I have no idea. Thank ya though. it was just i would put <img src="http://i408.photobucket.com/albums/pp164/jasonem/Harry-Potter-The-Order-Phoenix-Deat.jpg"> and under it the text table, but the table would be under the pic not on it
hallows is offline   Reply With Quote
Old 07-18-2011, 08:06 PM   PM User | #4
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
use z-index: number; the larger number will appear on top
Sammy12 is offline   Reply With Quote
Users who have thanked Sammy12 for this post:
hallows (07-18-2011)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:45 AM.


Advertisement
Log in to turn off these ads.