HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Coding in CSS - Want Solid image on Transparent Background
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
spaige08



Joined: 08 Feb 2008
Posts: 4

PostPosted: Mon Feb 18, 2008 11:42 am     Coding in CSS - Want Solid image on Transparent Background Reply with quote

I am designing a webpage in CSS. I have an image in the background and then a 50% transparent box over it. I would like to place and image at 100% opacity on top of the transparent background and not have it be transparent. Here is my coding:

<div style="width:750px;height:800px;margin-center:0px;padding:0px;color:#330000;background:#e9e0cc;float:center;filter:alpha(opacity=50);-moz-opacity:.50;opacity:.50;font-family:Verdana, Arial, Helvetica;font-size: 28px;line-height:26px;text-align:right;"><b>Please Look Around</b>
<br>
<div style="margin:0px auto;width:200px;height:100px;padding:10px;background:black;float:left;filter:alpha(opacity=100);-moz-opacity:1.0;opacity:1.0;border:2px solid black"><img src="http://www.stephenlasararchitects.com/nancylasar/PlaceHolder1.jpg" width="400" style="border:1px solid white;">

The image "PlaceHolder1" is the image I want at 100% opacity.

Thanks!
sticks464



Joined: 31 Dec 2006
Posts: 1122

PostPosted: Mon Feb 18, 2008 3:16 pm     Reply with quote

This maybe what you are after
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
#outer {
width:750px;
height:800px;
margin:0px;
padding:0px;
color:#330000;
background:#e9e0cc;
filter:alpha(opacity=50);
-moz-opacity:.50;
opacity:.50;
font-family:Verdana, Arial, Helvetica;
font-size: 28px;
line-height:26px;
text-align:right;
}
#inner {
margin:0px auto;
width:400px;
height:350px;
padding:10px;
background:#000 url(http://www.stephenlasararchitects.com/nancylasar/PlaceHolder1.jpg) no-repeat center center;
filter:alpha(opacity=100);
-moz-opacity:1.0;
opacity:1.0;
}
</style>
</head>

<body>
<div id="outer"><b>Please Look Around</b>
<div id="inner">
</div>
</div>
</body>
</html>

You are using some css that is non-existent
margin-center
float:center
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial