opacity - Making a transparent box with CSS -


I am trying to create a transparent box on the back of the container, however, I can not middle it Instead of the background, when I'm trying to use top-margin to get my design, it will also take down the background image, so I would like to ask that I like it as an example given by the W3C Why can not make it

  & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Transitional // N" "http://www.w3.org/TR/html4/loose.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; META http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Title & gt; Portal & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "style.css" type = "text / css" /> & Lt; Script type = "text / javascript" src = "ajax.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body Onload = "Load ()" & gt; & Lt; Div id = "header" & gt; & Lt; Img src = "picture / logo.gif" id = "logo" alt = "logo" /> & Lt; A href = "http://www.google.com" & gt; & Lt; Img src = "picture / a.png" id = "logo2" align = "right" alt = "logo" /> & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "container" & gt; & Lt; Div id = "function" & gt; & Lt; / Div & gt; & Lt; Div id = "display" & gt; & Lt; / Div & gt; & Lt; Div id = "see" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

Here is the CSS file:

  body {font-size: 100%; Margin: 0em 9em 0em 9em; } # Headers {Width: 55 AM; Height: 2.375em; Background: black; Border: 0em 0em 0em 0em; } #lollow {padding: 0em 0em 0em 2em; } # Logo 2 {Width: 3.618mm; Height: 2.3em; Margin: 0.1m 0.25em 0.1em 0em; } # Container {width: 55 AM; Height: 36.25 AM; Background Image: URL ("images / background1.jpg"); Margin: 0.25em 0em 0em 0em; } # Function {width: 35m; Height: 32.625em; Margin: 2 AM 10 AM; Background color: #ffffff; Opacity: 0.6; Filter: Alpha (Opacity = 60); } #footer {font-family: "Times New Roman"; Width: 62m; Font-size: 0.75em; Color: Gray; Border-top-style: solid; Border-color: gray; Border-width: 0.25em; Margin: 0.25em 0em 0em 5em; }    

There are a few ways you can do this:

Opacity:

  Genre {Opacity: 0.5; Filter: Alpha (Opacity = 50); // IE-Mojo-opacity: 0.5; // For Firefox & lt; 5.0}  RGBA color:   // final object is ambiguity   

one image:

  style {background: url ('image / transparent_img .png' ) Repeat left over; }   

RGBA is the best method, but is unsupported in older IE versions. Opacity is not well supported (ie again) You can use a riga () as a failback, but personally I now think that a transparent image is your best x-browser condition.

Edit: I do not understand the question, so you just want to add padding to the # containers.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -