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 11-18-2012, 03:36 AM   PM User | #1
ebookz
New Coder

 
Join Date: Nov 2012
Posts: 33
Thanks: 23
Thanked 0 Times in 0 Posts
ebookz is an unknown quantity at this point
Smile how to set an image as a table right corner

how to set an image as a table corner??I want set a image for a table corner..how can I do it in html or css...??? example plzz visit following table to get an idea what I want :

In this example u can see a "Details" image set to table right corner...
thanks in advanced..
ebookz is offline   Reply With Quote
Old 11-18-2012, 04:31 AM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
Could be done a number of ways. I would use an image for the details banner with transparent background. Position it absolutely to place it in the corner(table should be positioned absolutely also so they stay together) and use z-index to place the banner in front.
sunfighter is online now   Reply With Quote
Users who have thanked sunfighter for this post:
ebookz (11-18-2012)
Old 11-18-2012, 12:45 PM   PM User | #3
ebookz
New Coder

 
Join Date: Nov 2012
Posts: 33
Thanks: 23
Thanked 0 Times in 0 Posts
ebookz is an unknown quantity at this point
Quote:
Originally Posted by sunfighter View Post
Could be done a number of ways. I would use an image for the details banner with transparent background. Position it absolutely to place it in the corner(table should be positioned absolutely also so they stay together) and use z-index to place the banner in front.
need an example code?????
ebookz is offline   Reply With Quote
Old 11-18-2012, 07:09 PM   PM User | #4
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,551
Thanks: 0
Thanked 195 Times in 191 Posts
coothead will become famous soon enough
Hi there ebookz,

Quote:
...need an example code...
Check out the attachment to find it.


coothead
Attached Files
File Type: zip ebookz.zip (46.7 KB, 27 views)
coothead is offline   Reply With Quote
Users who have thanked coothead for this post:
ebookz (11-19-2012)
Old 11-18-2012, 09:22 PM   PM User | #5
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
I had to do a reset. I copied your image and enlarged it width wise and then made the back ground transparent. The image is on photo bucket, but is not cleaned up. You can get is and work with it yourself.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>New document</title>
<style type="text/css">
html, body, div, span {
	margin: 0;
	padding: 0;
	border: 0;
}
.first{
	width: 220px;
	text-align:right;
	padding-right: 15px;
}
.second{
	text-align:left;
	padding-left: 15px;
}
table{
	margin-top: 25px;
}
#banner{
	position: absolute;
	top: 13px;
}
#container{
	width: 712px;
	height: 400px;
	margin: auto;
}
</style>
</head>

<body>
<div id="container">
	<table width="700" border="1">
	<tr><td class="first">Admission Date</td><td class="second">July 20, 2012</td></tr>
	<tr><td class="first">Date of Birth</td><td class="second">July 20, 2007</td></tr>
	<tr><td class="first">Blood Group</td><td class="second"></td></tr>
	<tr><td class="first">Gender</td><td class="second">Male</td></tr>
	<tr><td class="first">Nationality</td><td class="second">India</td></tr>
	<tr><td class="first">Language</td><td class="second"></td></tr>
	<tr><td class="first">Catagory</td><td class="second">Hispanic</td></tr>
	<tr><td class="first">Religion</td><td class="second"></td></tr>
	<tr><td class="first">Address</td><td class="second"></td></tr>
	<tr><td class="first">City</td><td class="second"></td></tr>
	<tr><td class="first">State</td><td class="second"></td></tr>
	<tr><td class="first">PIN Code</td><td class="second"></td></tr>
	</table>
	<img id="banner" src="http://i815.photobucket.com/albums/zz74/sunfighter41/detail.png" border="0" alt="Photobucket"></a>
</div>
</body>
</html>
sunfighter is online now   Reply With Quote
Users who have thanked sunfighter for this post:
ebookz (11-19-2012)
Old 11-19-2012, 08:17 AM   PM User | #6
ebookz
New Coder

 
Join Date: Nov 2012
Posts: 33
Thanks: 23
Thanked 0 Times in 0 Posts
ebookz is an unknown quantity at this point
Smile

Quote:
Originally Posted by coothead View Post
Hi there ebookz,
Check out the attachment to find it.
coothead
wow fantastic code.... thanks so much frnd...u r a really great coder...keep it up ur gud work....

Last edited by ebookz; 11-19-2012 at 08:24 AM..
ebookz is offline   Reply With Quote
Old 11-19-2012, 08:23 AM   PM User | #7
ebookz
New Coder

 
Join Date: Nov 2012
Posts: 33
Thanks: 23
Thanked 0 Times in 0 Posts
ebookz is an unknown quantity at this point
Thumbs up thanks

Quote:
Originally Posted by sunfighter View Post
I had to do a reset. I copied your image and enlarged it width wise and then made the back ground transparent. The image is on photo bucket, but is not cleaned up. You can get is and work with it yourself.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>New document</title>
<style type="text/css">
html, body, div, span {
	margin: 0;
	padding: 0;
	border: 0;
}
.first{
	width: 220px;
	text-align:right;
	padding-right: 15px;
}
.second{
	text-align:left;
	padding-left: 15px;
}
table{
	margin-top: 25px;
}
#banner{
	position: absolute;
	top: 13px;
}
#container{
	width: 712px;
	height: 400px;
	margin: auto;
}
</style>
</head>

<body>
<div id="container">
	<table width="700" border="1">
	<tr><td class="first">Admission Date</td><td class="second">July 20, 2012</td></tr>
	<tr><td class="first">Date of Birth</td><td class="second">July 20, 2007</td></tr>
	<tr><td class="first">Blood Group</td><td class="second"></td></tr>
	<tr><td class="first">Gender</td><td class="second">Male</td></tr>
	<tr><td class="first">Nationality</td><td class="second">India</td></tr>
	<tr><td class="first">Language</td><td class="second"></td></tr>
	<tr><td class="first">Catagory</td><td class="second">Hispanic</td></tr>
	<tr><td class="first">Religion</td><td class="second"></td></tr>
	<tr><td class="first">Address</td><td class="second"></td></tr>
	<tr><td class="first">City</td><td class="second"></td></tr>
	<tr><td class="first">State</td><td class="second"></td></tr>
	<tr><td class="first">PIN Code</td><td class="second"></td></tr>
	</table>
	<img id="banner" src="http://i815.photobucket.com/albums/zz74/sunfighter41/detail.png" border="0" alt="Photobucket"></a>
</div>
</body>
</html>
thanks frnd..u all are doing great job in this forum.....keep it up...
ebookz is offline   Reply With Quote
Old 11-19-2012, 08:31 AM   PM User | #8
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,551
Thanks: 0
Thanked 195 Times in 191 Posts
coothead will become famous soon enough

No problem, you're very welcome.

coothead
coothead is offline   Reply With Quote
Old 11-19-2012, 01:05 PM   PM User | #9
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
Thank you
sunfighter is online now   Reply With Quote
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:51 AM.


Advertisement
Log in to turn off these ads.