Two div boxs centered and same height (with images) [duplicate] - html

This question already has answers here:
Align inline-block DIVs to top of container element
(5 answers)
Closed 2 years ago.
currently taking a course about HTML and CSS. As an assignment we've been told to replicate some parts from an online news paper.
The above picture is what I'm trying to reach. I imagine it being three div boxes. A parent one, and two child divs (right and left).
This is what it looks with what I've done:
Obvious as it is, the two child div boxes wont align in height. I can't seem to figure this out, sadly.. So I hope one here can help me!
.overskrift {
text-align: center;
font-size: 50px;
}
.div2 {
display: block;
border: 1px solid black;
overflow: hidden;
text-align: center;
}
.div2-left {
display: inline-block;
border: 1px solid black;
width: 30%;
}
.div2-right {
display: inline-block;
border: 1px solid black;
width: 20%;
}
.debat {
color: DodgerBlue;
font-weight: bold;
}
.arkiv {
color: white;
}
.arkiv span {
background-color: DodgerBlue;
}
.div-2-1-img {
height: 75%;
width: 75%;
}
.div-2-2-img {
height: 50%;
width: 50%;
}
<div>
<p>dette er div1 (første artikel)</p>
</div>
<div class="div2">
<div class="div2-left">
<img class="div-2-1-img" src="http://placehold.it/150">
<p class="debat">DEBAT</p>
<h2>Hvor er tilsynet?</h2>
<div style="display: inline-block; text-align: left; margin-left: 25%">
<p>Historien om udledning af spildevand vidner om norsk dobbeltmoral og dansk blåøjethed.</p>
</div>
<p>MIKALA SØRENSEN</p>
</div>
<div class="div2-right">
<p class="arkiv"> <span>FRA ARKIVET</span></p>
<img class="div-2-1-img" src="http://placehold.it/150">
<h2>Som smurt i olie</h2>
<div style="display: inline-block; text-align: left; margin-left: 10%">
<p>Et dansk firma har i årtier importeret hele <br> tankskibe fulde af forurenet spildevand fra <br> den norske olieindustri. De fortynder det <br> med grundvand, renser det og leder det ud <br> i Agersø Sund. Lokale klager over <br> forurening og
døde fisk. De føler, at ingen <br> lytter.</p>
</div>
<p>MAGNUS BODING HANSEN</p>
</div>
</div>
I really hope someone is able to help me out here. I am really stuck.. Thanks in advance! And may you have a great day!

Take a look at flexbox. By setting display: flex on the parent you can then add align-items: flex-start to tell the flex parent to make the child divs align to the start, or top. align-items: flex-start is actually the default, and not needed, but wanted to add for some additional context.
.div2 {
align-items: flex-start;
display: flex; // This is the important line
border: 1px solid black;
overflow: hidden;
text-align: center;
}
.div2-left {
border: 1px solid black;
width: 30%;
}
.div2-right {
border: 1px solid black;
width: 20%;
}

Change the vertical-align property of your two divs from the default of baseline to top.
.overskrift {
text-align: center;
font-size: 50px;
}
.div2 {
display: block;
border: 1px solid black;
overflow: hidden;
text-align: center;
}
.div2-left {
display: inline-block;
border: 1px solid black;
width: 30%;
}
.div2-right {
display: inline-block;
border: 1px solid black;
width: 20%;
}
.debat {
color: DodgerBlue;
font-weight: bold;
}
.arkiv {
color: white;
}
.arkiv span {
background-color: DodgerBlue;
}
.div-2-1-img {
height: 75%;
width: 75%;
}
.div-2-2-img {
height: 50%;
width: 50%;
}
.div2-left,
.div2-right {
vertical-align: top;
}
<div>
<p>dette er div1 (første artikel)</p>
</div>
<div class="div2">
<div class="div2-left">
<img class="div-2-1-img" src="http://placehold.it/150">
<p class="debat">DEBAT</p>
<h2>Hvor er tilsynet?</h2>
<div style="display: inline-block; text-align: left; margin-left: 25%">
<p>Historien om udledning af spildevand vidner om norsk dobbeltmoral og dansk blåøjethed.</p>
</div>
<p>MIKALA SØRENSEN</p>
</div>
<div class="div2-right">
<p class="arkiv"> <span>FRA ARKIVET</span></p>
<img class="div-2-1-img" src="http://placehold.it/150">
<h2>Som smurt i olie</h2>
<div style="display: inline-block; text-align: left; margin-left: 10%">
<p>Et dansk firma har i årtier importeret hele <br> tankskibe fulde af forurenet spildevand fra <br> den norske olieindustri. De fortynder det <br> med grundvand, renser det og leder det ud <br> i Agersø Sund. Lokale klager over <br> forurening og
døde fisk. De føler, at ingen <br> lytter.</p>
</div>
<p>MAGNUS BODING HANSEN</p>
</div>
</div>

Related

Positioning of words in the header, footer positioning,

that's my first site with html and css. I'm doing a personal website and i have problems:
1) right positioning of words in the header
2) footer positioning
the code is:
<head>
<meta cherset='UTF-8'/>
<title>HOME</title>
<link rel='stylesheet' href='styles.css'/>
</head>
<body>
<header class='header'>
<ul class='header__menu animate'>
<li class="header__menu__item">HOME</li>
<li class="header__menu__item">HOBBY E PASSIONI</li>
<li class="header__menu__item">CURRICULUM</li>
<li class="header__menu__item">CONTATTI</li>
</ul>
</header>
<br><br><br><br><br>
<h1>Gabriele Minosa</h1>
<br><br><br>
<div class='img'>
<img src="1111.png">
</div>
<figcaption> text...
</figcaption>
<br><br>
<footer class='footer'>
<p>© 2020 Gabriele Minosa. TUTTI I DIRITTI RISERVATI</p>
</footer>
</div>
</body>
</html>
CSS**********
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: auto;
height: 1200px;
font-size: 18px;
font-family: sans-serif;
color: #000000; /*colore scritte*/
background: #eee; /*COLORE ESTERNO PAGINA WEB*/
}
a:link,
a:visited {
color: #5D6063; /*COLORE SCRITTE INTESTAZIONE*/
text-decoration: none;
}
a:hover {
background: #fff;
padding: 10px;
}
.header {
position: fixed;
width: 100%;
display: flex;
padding: 30px;
background: #d6d6d2;
}
.header__menu__item {
display: inline-block;
}
h1 {
color:#949da6;
font-size:40;
text-align: center;
}
figcaption, footer {
text-align: center;
}
.img {
text-align: center;
}
.footer {
background: #333;
padding: 20px;
color: #fff;
}
if anyone could tell me, apart from those two questions, what other changes I can make and what other mistakes I made I would be grateful..that's my first time...
In order to align the menu to the right inside a flex container, you can change the justification of the flex items by using justify-content: flex-end; - this positions the elements horizontally at the end of the container.
.header {
position: fixed;
width: 100%;
display: flex;
justify-content: flex-end;
padding: 30px;
background: #d6d6d2;
}
In regards to your second question regarding footer positioning, what are you attempting to achieve?
In the below code snippet, which I believe achieves your desired results, there's a couple of changes I've made;
I wrapped your page content (the stuff in between the header and footer) in a <main> tag. This tag is given a min-height value of 80vh - or 80% of the height of the viewport. This will make sure that your footer is towards the bottom of the page. If you have a page with less content you may want to change this to 90 or even 100.
The display property for header__menu <ul> has been set to flex. Justify content is used here but this time setting the value to space-between.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: auto;
font-size: 18px;
font-family: sans-serif;
color: #000000; /*colore scritte*/
background: #eee; /*COLORE ESTERNO PAGINA WEB*/
}
main{
min-height: 90vh;
}
a:link,
a:visited {
color: #5D6063; /*COLORE SCRITTE INTESTAZIONE*/
text-decoration: none;
}
a:hover {
background: #fff;
padding: 10px;
}
.header {
position: fixed;
width: 100%;
display: flex;
padding: 30px;
background: #d6d6d2;
}
.header__menu {
display: flex;
justify-content: space-between;
width: 80%;
margin: 0 auto;
}
.header__menu__item {
display: inline-block;
}
h1 {
color:#949da6;
font-size:40;
text-align: center;
}
figcaption, footer {
text-align: center;
}
.img {
text-align: center;
}
.footer {
background: #333;
padding: 20px;
color: #fff;
}
<header class='header'>
<ul class='header__menu animate'>
<li class="header__menu__item">HOME</li>
<li class="header__menu__item">HOBBY E PASSIONI</li>
<li class="header__menu__item">CURRICULUM</li>
<li class="header__menu__item">CONTATTI</li>
</ul>
</header>
<main>
<br><br><br><br><br>
<h1>Gabriele Minosa</h1>
<br><br><br>
<div class='img'>
<img src="1111.png">
</div>
<figcaption> Gabriele Minosa (Taranto, 12 Gennaio 1991) è un perito informatico con la passione per l’informatica fin da bambino.<br>
Dopo aver imparato,da autodidatta, a gestire l'hardware ed il software dei pc, allarga la sua curiosità al mondo dell'innovazione <br>
e della programmazione web. Non essendo particolarmente stimolato dal contenuto troppo generalizzato del percorso universitario, <br>
dopo alcune esperienze lavorative e svariati concorsi, è attualmente uno studente di Front End Development di start2impact, una <br>
startup di Roma che propone percorsi innovativi sulla programmazione e sulle nuove tecnologie e rende potenzialmente più immediato <br>
e diretto l'inserimento nel mondo del lavoro.
</figcaption>
</main>
<br><br>
<footer class='footer'>
<p>© 2020 Gabriele Minosa. TUTTI I DIRITTI RISERVATI</p>
</footer>

Can the scroll go down every time i reload the page?

Hello guys im implementing a chat, the issue is that every time that i reload the page the scroll is always on the top of the chat and i want on the bottom, i tried with jquery but doesnt work.
This is my html:
<body>
<div class="chatbox">
<div class="chatlogs">
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">What's up, Brother ..!!</p>
</div>
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">What's up, Brother ..!!</p>
</div>
<div class="chat self">
<div class="user-photo"></div>
<p class="chat-message">What's up ..!!</p>
</div>
<div class="chat self">
<div class="user-photo"></div>
<p class="chat-message">A única área que eu acho, que vai exigir muita atenção nossa, e aí eu já aventei a hipótese de até criar um ministério. É na área de... Na área... Eu diria assim, como uma espécie de analogia com o que acontece na área agrícola.</p>
</div>
<div class="chat friend">
<div class="user-photo"></div>
<p class="chat-message">No meu xinélo da humildade eu gostaria muito de ver o Neymar e o Ganso. Por que eu acho que.... 11 entre 10 brasileiros gostariam. Você veja, eu já vi, parei de ver. Voltei a ver, e acho que o Neymar e o Ganso têm essa capacidade de fazer a gente olhar.
Todos as descrições das pessoas são sobre a humanidade do atendimento, a pessoa pega no pulso, examina, olha com carinho. Então eu acho que vai ter outra coisa, que os médicos cubanos trouxeram pro brasil, um alto grau de humanidade.
</p>
</div>
</div>
<div class="chat-form">
<textarea></textarea>
<button>Send</button>
</div>
</div>
And this is my css:
* {
margin: 0;
padding: 0;
font-family: tahoma, sans-serif;
box-sizing: border-box;
}
body {
background: #1ddced;
}
.chatbox {
width: 500px;
min-width: 390px;
height: 600px;
background: #fff;
padding: 25px;
margin: 20px auto;
box-shadow: 0 3px #ccc;
}
.chatlogs {
padding: 10px;
width: 100%;
height: 450px;
overflow-x: hidden;
overflow-y: scroll;
}
.chatlogs::-webkit-scrollbar {
width: 10px;
}
.chatlogs::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba(0,0,0,.1);
}
.chat {
display: flex;
flex-flow: row wrap;
align-items: flex-start;
margin-bottom: 10px;
}
.chat .user-photo {
width: 60px;
height: 60px;
background: #ccc;
border-radius: 50%;
}
.chat .chat-message {
width: 80%;
padding: 15px;
margin: 5px 10px 0;
border-radius: 10px;
color: #fff;
font-size: 20px;
}
.friend .chat-message {
background: #1adda4;
}
.self .chat-message {
background: #1ddced;
order: -1;
}
.chat-form {
margin-top: 20px;
display: flex;
align-items: flex-start;
}
.chat-form textarea {
background: #fbfbfb;
width: 75%;
height: 50px;
border: 2px solid #eee;
border-radius: 3px;
resize: none;
padding: 10px;
font-size: 18px;
color: #333;
}
.chat-form textarea:focus {
background: #fff;
}
.chat-form button {
background: #1ddced;
padding: 5px 15px;
font-size: 30px;
color: #fff;
border: none;
margin: 0 10px;
border-radius: 3px;
box-shadow: 0 3px 0 #0eb2c1;
cursor: pointer;
-webkit-transaction: background .2s ease;
-moz-transaction: backgroud .2s ease;
-o-transaction: backgroud .2s ease;
}
.chat-form button:hover {
background: #13c8d9;
}
One more question, can i block horizontal scroll not only hide.
I hope you guys can help, thanks.
You're primarily looking for the javascript native scrollIntoView function. Though in lieu of anything else you'll still need jQuery for finding your element to scroll to.
$(document).ready(function () {
$('.chat.friend').last()[0].scrollIntoView();
})
Cool options such as smooth scrolling and compatibility at https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
As for blocking horizontal slide, I'm not quite sure what you mean. You've already got it wrapping words appropriately. If you're looking to prevent very long words or URLs from going off the edge, then look into https://www.w3schools.com/cssref/css3_pr_word-break.asp, e.g.,
word-break: break-all;
If you're meaning images, then you'll need to see the max-width property for images
img {
max-width: 100%;
}
Try putting MaintainScrollPositionOnPostback="true" in your page declaration. Setting this to true will keep the user at the same place on the screen after a postback occurs.
You can read more about it here.

Other css box is moving when im writing to the one im using [duplicate]

This question already has answers here:
How to align a div to the top of its parent but keeping its inline-block behaviour?
(5 answers)
Closed 5 years ago.
So when im trying to add a paragraph to my box, the other one moves.. Ive been looking to see if its something wrong with the margin or so, but not that i can see.
I have absolutely no idea how to fix it.
This is how it looks before i do something:
https://imgur.com/a/lZZq4
This is how it looks after i add some text or whatever to the box
https://imgur.com/a/FXkrf
As you can see, the other box is moving, and the more i write, the further down its going.
Would appreciate some explanation here.
HTML CODE:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inlamningsuppgift 1</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
<div id="wrapper">
<header>
<h1> Inlamningsuppgift 1 </h1>
</header>
<nav id="firstnav">
Start
Filmer
Bildspel
<select>
<option value="Blue"> Blå </option>
<option value="Red"> Röd </option>
<option value="Violet"> Lila </option>
</select>
</nav>
<section>
<h3> Välkommen till min webbplats! </h3>
<article id="presentation">
<h4> Vem är skaparen av sidan? </h4>
</article>
<article id="anledning">
<h4> Anledning till att jag gör denna sidan </h4>
<p> hej
</article>
<article id="utmaningar">
<h4> Tre saker jag tyckt varit utmanande med uppgiften </h4>
<ul>
<li> Sak 1 </li>
<li> Sak 2 </li>
<li> Sak 3 </li>
</ul>
</article>
</section>
<footer>
</footer>
</div>
</body>
</html>
CSS CODE:
#wrapper{
margin-left:auto;
margin-right:auto;
width:970px;
}
header{
background-color: grey;
text-align: center;
padding: 10px;
}
#firstnav{
background-color: black;
padding: 10px;
}
#start{
margin-right: 250px;
text-decoration: none;
color: white;
}
#filmer{
margin-right: 150px;
text-decoration: none;
color: white;
}
#bildspel{
text-decoration: none;
color: white;
}
nav select{
float: right;
width:250px;
}
section{
background-color: grey;
padding-top: 1px;
padding-bottom: 40px;
}
section h3{
text-align: center;
padding-bottom: 12px;
}
#presentation{
width: 350px;
height: 100px;
background-color: white;
display: inline-block;
margin-left: 75px;
padding-left: 20px;
clear: both;
}
#presentation img{
width: 40px;
height: 40px;
}
#anledning{
display: inline-block;
height: 100px;
background-color: white;
width: 350px;
margin-left: 70px;
padding-left: 20px;
clear: both;
}
#utmaningar{
background-color: white;
width: 850px;
margin-left: 70px;
}
#utmaningar > h4{
padding-left: 10px;
padding-top: 8px;
}
footer{
text-align: center;
background-color: black;
color: white;
padding: 10px;
}
Its the id with #presentation and #anledning which are moving.
Figured out the answer:
Apparently if you add
vertical-align:top;
It sorts out.
Just use vertical-align: top
CSS
#presentation {
width: 350px;
height: 100px;
background-color: white;
display: inline-block;
margin-left: 75px;
padding-left: 20px;
clear: both;
vertical-align: top;
}

trying to make my background image transparent

here is part of the CSS code, i cant seem to figure it out.
#About{
height:500px;
background: url("murano.jpg") no-repeat center;
}
I want to decrease the opacity of the imported background image
Add Opacity with your css
#About{
opacity :0.4;
height:500px;
background: url("murano.jpg") no-repeat center;
}
the best solution would be to create another div inside your #about div and position that div absolute while position your #about div to relative and give the background of this newly added div as rgba(0,0,0,0.5) where 0.5 represents the opacity
there is no css rule to provide opacity to background images.
when you put the opacity of #about div to 0.4 of course its child will inherit this property and any text inside about div will get the opacity of 0.4
<div id="about">
<div class="absolute">
</div>
</div>
#about{
position:relative;
background:url(..);
}
.absolute{
position:absolute;
background:rgba(0,0,0,0.5);
}
Use background-color: rgba(255, 255, 0, 0.3);
The 0.3 being the the alpha(opacity channel).
OR
Add an extra div to hold the background, and change the opacity there.
opacity: 0.4; filter:alpha(opacity=40);
Example :
#background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('http://i40.tinypic.com/3531bba.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
opacity: 0.4;
filter: alpha(opacity=40);
}
.head {
width: 150px;
height: 160px;
}
body {
font-family: tahoma, helvetica, arial, sans-serif;
font-size: 12px;
text-align: center;
background: #000;
color: #ddd4d4;
padding-top: 12px;
line-height: 2;
}
td,
th {
font-size: 12px;
text-align: left;
line-height: 2;
}
#wrapper {
margin: auto;
text-align: left;
width: 832px;
position: relative;
padding-top: 27px;
}
#body {
background: url(images/body_bg_1.gif) repeat-y;
width: 832px;
}
#bodyi {
background: url(images/body_top_1.gif) no-repeat;
width: 832px;
}
#bodyj {
background: url(images/body_bot_1.gif) bottom no-repeat;
padding: 1px 0;
}
#body2 {
background: url(images/body_bg_2.gif) repeat-y;
width: 832px;
}
#bodyi2 {
background: url(images/body_top_2.gif) no-repeat;
width: 832px;
}
#bodyj2 {
background: url(images/body_bot_2.gif) bottom no-repeat;
padding: 1px 0;
}
h1,
h2,
h3,
#nav,
#nav li {
margin: 0;
padding: 0;
}
#nav {
font-size: 10px;
position: absolute;
right: 0;
top: 12px;
line-height: 1.2;
padding-left: 120px;
}
#nav li {
float: left;
width: 108px;
list-style: none;
margin-left: 2px;
border-bottom: 1px solid black;
}
#nav a {
background: #738d09;
color: #2e3901;
font-weight: bold;
text-decoration: none;
display: block;
text-align: center;
padding: 1px 0;
}
#sidebar {
float: left;
width: 250px;
padding-left: 4px;
}
#sidebar .content {
padding-left: 24px;
}
#sidebar .content img {
float: left;
clear: left;
margin: 5px 5px 5px 0;
}
#sidebar .divider {
background: url(images/left_splitter.gif) center no-repeat;
height: 5px;
width: 169px;
}
#content {
float: right;
width: 462px;
}
#content1 {
float: left;
width: 800px;
}
#content1 .content {
margin: 7px 35px 7px 20px;
padding-left: 20px;
}
#content .content {
margin: 7px 55px 7px 17px;
}
#content .content table {
width: 310px;
margin-right: 0px;
}
#content .content table td,
#content .content table th {
padding-right: 10px;
}
#content .content table td.download {
text-align: right;
padding-right: 0px;
}
#content .divider {
background: url(images/right_splitter.gif) repeat-x;
height: 5px;
}
h1 {
position: absolute;
left: 0;
top: 0;
}
h2 {
font-size: 10px;
color: #cf9118;
margin: 1em 0;
}
h3 {
font-size: 10px;
margin: 1em 0;
}
h5 {
font-size: 20px;
color: #cf9118;
margin: 1em 0;
text-align: center;
}
h6 {
font-size: 18px;
margin: 1em 0;
}
p {
margin: 1em 0;
}
img {
border: 0;
}
img.left {
float: left;
margin-right: 14px;
}
img.right {
float: right;
margin-left: 14px;
}
.readmore {
text-align: right;
}
.hidden {
visibility: hidden;
}
.clear {
clear: both;
}
a {
color: #f0b33c;
font-weight: bold;
text-decoration: none;
}
a:visited {
color: #cf9118;
}
a:hover {
text-decoration: underline;
}
table a {
text-decoration: underline;
font-weight: normal;
color: #7f7c79;
}
#power {
color: #fff;
text-align: center;
}
#power a {
color: #fff;
}
<div id="background"></div>
<div class="head">
</div>
<div id="wrapper">
<ul id="nav">
<li>Inicio
</li>
<li>Sobre a banda
</li>
<li>Membros
</li>
<li>Bilhetes
</li>
<li>Galeria
</li>
<li>Área Pessoal
</li>
</ul>
<h1></h1>
<div id="body">
<div id="bodyi">
<div id="bodyj">
<div id="sidebar">
<div class="content">
<h2>Galeria de imagens</h2>
<p>Aqui poderá encontrar uma galeria de imagens da banda, com fotos de concertos, entre outras imagens.</p>
<p class="readmore">Ver
</p>
</div>
<div class="content">
<h2>Noticias</h2>
<h3>18 de Abril, 2011</h3>
<h4>"So Far Away" vai ter videoclip</h4>
<p>Muitos se questionavam se o mais recente single dos Avenged Sevenfold, "So Far Away", ia ter direito a um videoclip. Eis que surge a boa notícia para os fãs dos A7X: So Far Away vai ter videoclip. Já foram divulgadas algumas fotos do set de
filmagens.</p>
<h3>10 de Março, 2011</h3>
<h4>A7X nomeados para a Metal Hammer Golden Gods Awards 2011</h4>
<p>Os Avenged Sevenfold foram nomeados para a Metal Hammer Golden Gods Awards 2011 em duas categorias. As categorias onde os A7X estão a participar são as seguintes:
<p>
- Best International Band (Melhor Banda Internacional)
<p>
- Best Shredder (com o Synyster Gates) (Melhor Shredder)</p>
</div>
</div>
<div id="content">
<center>
<img src="images/avengeds.jpg" width="346" height="234" alt="four men walking" />
</center>
<div class="content">
<h2>O album mais recente</h2>
<img src="images/nightmare.jpg" width="82" height="80" alt="Unwired album cover" class="left" />
<p>Os californianos Avenged Sevenfold estão de volta aos discos com "Nightmare". Solos de guitarra, vocalizações rasgadas e um som contagiante continuam a ser a base do sucesso de uma das bandas de heavy-metal com mais fãs no mundo inteiro. Fundados
em 1999 por M. Shadows, Synyster Gates, Zacky Vengeance, Johnny Christ e The Rev - baterista que faleceu em Dezembro de 2009 passado e que foi substituido neste disco por Mike Portnoy, dos Dream Theater - os Avenged Sevenfold já contam com
cinco discos de originais na sua carreira.</p>
<div class="divider"></div>
<h2>Musicas com maior sucesso</h2>
<table summary="track downloads" border="0" cellspacing="0">
<tr>
<th width="55%">Faixa</th>
<th>Album</th>
<th class="hidden">Dowload links</th>
</tr>
<tr>
<td>Bat Country</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Beast and the Harlot</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Seize the Day</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Almost Easy</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Afterlife</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Nightmare</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Welcome to the Family</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
</table>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div align="right">
<font size="2">text</font>
</div>
</div>
you would want to add the background to the #about:after and then apply the transparency to that. there is no way to add the transparency directly to the background as far as I know.
here is a link to a good article on this.

Tables in HTML and CSS

I would like the table inside this image: http://postimg.org/image/tlkfdlao3/
to be aligned like: http://postimg.org/image/motp2rkit/
This is my Html code:
<table>
<tr>
<td width="132px">
<span>iNotes è qui!</span>
<br />
<p id="inotesText">Una nuova app per prendere note in un modo completamente nuovo ed intuitivo!</p>
</td>
<td width="52px">
<img src="images/pencil.png" alt="pencil" />
</td>
</tr>
</table>
and CSS:
#pencil {
padding-left:0px;
width: 52px;
height: 204px;
}
#appStoreAvailable {
padding-top:50px;
width: 149px;
height: 101px;
}
#description1 {
}
#description1 span  {
color:#2d2d2d;
font-size:16px;
}
#inotesText {
text-align: left;
font-weight: 400;
font-size: 13px;
color: #616161;
}
Here's a rough idea how you might lay this out with CSS. Realize that this is incomplete and doesn't account for browser variation.
http://jsfiddle.net/93TBf/2
.wrapper {
margin: 30px;
padding: 15px;
display: inline-block;
overflow: hidden;
background-color: #fff;
border-radius: 10px;
box-shadow: 2px 2px 15px #aaa;
font-family: arial;
}
.header {
border-bottom: 1px solid #bbb;
padding: 8px 0;
overflow: hidden;
}
.icon {
float: left;
margin-right: 10px;
}
.item {
float: right;
margin-left: 10px;
}
<div class="wrapper">
<div class="header">
<img class="icon" src="http://placehold.it/50x50" />
<strong>iNotes HD</strong>
<br />Utility
<button>0,89 $</button>
</div>
<div class="body">
<img class="item" src="http://placehold.it/50x150" />
<h2>iNotes e qui!</h2>
Una nuova app per prendere note in un
</div>
</div>
You should use li
for example
<ul class="yourclass">
<li>
Yourcontent
</li>
</ul>
This is the best you can do to layout!