0

i need help!!!!

i'm trying to style a login form with an opacity fade but i just want the background to be faded not the content, how can i fix this ? <html> <section id="content"> <form id="inForm"> <br> <p id="n">First Name:</p> <br> <input id="Fname" type="text" name="Fname" value="..."> <br> <p id="n">Last Name:</p> <br> <input type="text" name="Lname" value="..."> <br> <br> <input type="button" value="submitt" onclick=" "> </form> </section> </html> <style> #content{ border-style:solid; border-color:; border-radius:50px; background-color:gray; opacity: 0.5; filter: alpha(opacity=50); height:190px; margin:600px; margin-top:100px; margin-bottom:5px; text-align:center; box-shadow:; position:relative; top:180px; width:200px; } #n{ margin: 0; padding:0; font-weight: bold; color: #000000; } </style>

7th Jul 2017, 4:39 AM
Hoeft Brian
Hoeft Brian - avatar
2 Réponses
+ 1
First of all add a body tag. *Opacity also affects the content. You can use this instead: -element to be transparent: background-color : transparent; -with colors: background-color: rgba(0, 0, 255, 0.4); ------------------------------------------------------ <!DOCTYPE html> <html> <body style="background-color: rgba(0, 0, 255, 0.4);"> <section id="content"> <form id="inForm"> <br> <p id="n">First Name:</p> <br> <input id="Fname" type="text" name="Fname" value="..."> <br> <p id="n">Last Name:</p> <br> <input type="text" name="Lname" value="..."> <br> <br> <input type="button" value="submitt" onclick=" "> </form> </section> </body> <style> #content{ border-radius:50px; background-color:gray; height:190px; margin:600px; margin-top:100px; margin-bottom:5px; text-align:center; position:relative; top:180px; width:200px; } #n{ margin: 0; padding:0; font-weight: bold; color: #000000; } </style> </html>
7th Jul 2017, 5:47 AM
Rae
Rae - avatar
0
i do have a body tag that was just a piece of the code, im trying to make only the #content transparent and not the form or the body of the html document but i cant find any useful examples or tutorial that will help with that.
7th Jul 2017, 10:44 AM
Hoeft Brian
Hoeft Brian - avatar