Jump to content
php.lv forumi

div saturs caurspīdīgs


Recommended Posts

Posted

div css man ir šāds:

background-color:#211101;
filter:alpha(opacity=70);
-moz-opacity:0.7;
-khtml-opacity: 0.7;
opacity: 0.7;
-moz-border-radius: 5px;
margin:2px 2px 2px 2px;
padding:0px 0px 0px 0px;
width:400px;
height:50px;
float:left;
postition:relative;

 

Bet tas kas atrodas man iekšā arī ir caurspīdīs.. Bildes un teksts ka var panāk tolai div saturs nav caurspīdīgs?

Posted

Ja gribi ar css, tad mēģini sekojoši:

 

Definē sākumā apmēram šādas klases (pielabo pēc vajadzības):

 

div.outer {
width:400px;
height:50px;
position: relative;
float:left;
}

div.outer div.transparent {
background-color: #211101;
filter: alpha(opacity=70);
-moz-opacity: 0.7;
-khtml-opacity: 0.7;
opacity: 0.7;
-moz-border-radius: 5px;
width: 400px;
height: 50px;
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}

div.outer div.content {
width: 404px;
height: 54px;
color: white;
top: 0px;
left: 0px;
margin: 5px;
padding: 0px;
position: absolute;
z-index: 2;
}

 

Vēlāk pašā kodā jau raksti:

 

<div class="outer">
<div class="transparent"></div>
<div class="content">
	<b>Kaut kāds saturs, kas nav caurspīdīgs.</b>
</div>
</div>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...