Text besides Image doesnt work for specific image. Why? - html

i use the following code to put text beside image:
<div style="display:inline-block;vertical-align:bottom">
<p><img src="CIMA/CimaMetanoia.png" alt="Cool" height="50%" width="50%" /></p>
</div>
<div style="display:inline-block;">
<p class="text">
<div> <font color="#d54646"><b>MOVIDA</b> es un ministerio christiano, latino, internacional <br> e interdenominacional con el propósito de: </font> <br><br> </div>
<div> <b><font color="#2089a4">DESAFIAR</font></b> <br>al joven christiano a una entrega total a Dios y a crecer en su relación con El.<br><br> </div>
<div> <b><font color="#2089a4">PROVEERLE</font></b> <br> herramientas para que descubra sus dones y talentos.<br><br> </div>
<div> <b><font color="#2089a4">MOTIVARLO</font></b> <br> a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.<br> </div>
</p>
</div>
However, even if i change the size of my image, it is always above the text... why?
Finally i used the template "initializr" (see google), because it makes all responsive too, which i needed! thank you all anyway!

you might try adding the position property to the image
so, in this case,
image{position:fixed , absolute , relative; top:50%; left:50%;}
or this may work as well:
<div>
<image></image>
<p></p>
</div>

A commenter asked that I work with your code only. So, here's a solution using your code, to make the 2 divs sit next to each other.
<div style="float: left; width: 49%;">
<p><img alt="Cool" src="http://placehold.it/350x150" height="50%" width="50%" /></p>
</div>
<div style="float: right; width: 49%;">
<p class="text">
<div> <font color="#d54646"><b>MOVIDA</b> es un ministerio christiano, latino, internacional <br> e interdenominacional con el propósito de: </font> <br><br> </div>
<div> <b><font color="#2089a4">DESAFIAR</font></b> <br>al joven christiano a una entrega total a Dios y a crecer en su relación con El.<br><br> </div>
<div> <b><font color="#2089a4">PROVEERLE</font></b> <br> herramientas para que descubra sus dones y talentos.<br><br> </div>
<div> <b><font color="#2089a4">MOTIVARLO</font></b> <br> a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.<br> </div>
</p>
</div>
EDITED
Below I've posted code that in my mind is better formatted for your solution. Just wanted to offer up some alternatives.
<style type="text/css">
.left {
float: left;
width: 50%;
height: 50%;
}
.left img {
width: 100%;
height: 100%;
}
.right {
float: right;
}
.movida strong {
color: #d54646;
}
.common strong {
color: #2089a4;
}
.text strong {
display: block;
font-weight: bold;
}
</style>
<div class="left">
<p><img src="CIMA/CimaMetanoia.png" alt="Cool" /></p>
</div>
<div class="right">
<p class="text">
<div><span class="movida"><strong>MOVIDA</strong>es un ministerio christiano, latino, internacional e interdenominacional con el propósito de:</span></div>
<div><span class="common"><strong>DESAFIAR</strong>al joven christiano a una entrega total a Dios y a crecer en su relación con El.</span></div>
<div><span class="common"><strong>PROVEERLE</strong>herramientas para que descubra sus dones y talentos.</span></div>
<div><span class="common"><strong>MOTIVARLO</strong>a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.</span></div>
</p>
</div>

The text is pushed below the image because the combined width of the two container divs is wider than the page, so it pushes the second div below the first one:
<div style="display:inline-block;vertical-align:bottom;width:200px;">
http://jsfiddle.net/3Luby/

Related

How to get width of the parent div

I used the class css text-overflow: ellipsis; , but I need to get the width of the div parent id="container" , and the width of the div child class="ellipsis" would be the same value as the parent div .
<div id="container" >
<div class="title" >
title
<div class="actions-container" >
<div class="fields">
</div>
</div>
</div>
<div class="body" >
<div class="champ2">
Paragraphe :
</div>
<div class="valeur" >
<div class="ellipsis" appIsEllipsisActiveDirective >
Un paragraphe est une section de texte en prose vouée au développement d'un point particulier souvent au moyen de plusieurs phrases, dans la continuité du précédent et du suivant. Sur le plan typographique, le début d'un paragraphe est marqué par un léger renfoncement ou par un saut de ligne
</div>
</div>
</div>
</div>
Set in the style of the child div width: 100%; or try margin-right: 0px;

I can't move up an element inside a Bootstrap modal

For some reason, I can't move up an element inside a Bootstrap modal, along some others.
Here:
Specifically the Hardware/Software extra part. Look how down it is! In the CSS it is named like:
.hardsoft-xtra
I already tried:
padding-top
margin-top
!important
My CSS specifications for the panel and how I organized it:
/*Comienza los modals con las características GENERALES (class)*/
/*Este es en general donde se mete todo*/
/*Los #media hacen responsivos a los modals*/
.caracs{
width: 460px !important;
font-family: 'Poppins', sans-serif;
}
#media (min-width: 768px) { .caracs{
width: 500px !important;
font-family: 'Poppins', sans-serif;
} }
#media (min-width: 992px) { .caracs{
width: 810px !important;
font-family: 'Poppins', sans-serif;
} }
#media (min-width: 1200px) { .caracs{
width: 810px !important;
font-family: 'Poppins', sans-serif;
} }
/*No jala*/
.caracs > ul{
text-align: left;
}
/*div izquierdo*/
.nombre-datos{
display: inline-block; /*Necesario para que los divs estén en el mismo renglón*/
width: 250px !important;
font-size: 0.8em;
text-align: justify;
}
.valoracion{
height: 35px;
background-color: orange;
color: white;
padding-top: 8px;
padding-left: 10px;
font-size: 1.5em !important;
}
.filtros{
padding-top: 5px;
font-size: 1.2em;
}
/*div-derecho*/
.mas-datos{
vertical-align: top; /*Necesario para que el 2° div a la derecha comience desde arriba*/
display: inline-block;
}
.so{
display: inline-block;
width: 235px;
background-color: #f2f2f2;
text-align: justify !important;
}
.hardsoft-xtra{
display: inline-block;
width: 275px;
text-align: justify !important;
}
.nivel{
background-color: #dbdbdb;
text-align: justify !important;
}
/*Terminan los modals con las características GENERALES (class)*/
How can I move it up so it gets aligned with Sistema operativo?
Here is the HTML code. Consists of a clickable Bootstrap panel, which opens a modal specific to that one:
<div class="container">
<div class="row">
<a href="#modal2" data-toggle="modal" data-target="#modal2">
<div class="col-sm-8 col-md-offset-2">
<div class="panel panel-default buscadoresInternet sinInternet" id="app1">
<div class="panel-heading">
Google
</div>
<div class="panel-body apps">
<div class="imagen">
<img src="media/buscadoresInternet/google.png" alt="Google">
</div>
<p>El buscador de Google o buscador web de Google (en inglés Google Search) es un motor de búsqueda
en la web propiedaad y el principal producto de Alphabet Inc., es el más utilizado en la
Web, recibe cientos de millones de consultas cada día a través de sus diferentes servicios.
El objetivo principal del buscador de Google es buscar texto en las páginas web, en lugar
de otro tipo de datos.
</p>
</div>
</div>
</div>
</a>
</div>
</div>
<!--Modal de Google-->
<div class="modal fade" id="modal2" role="dialog">
<div class="modal-dialog caracs">
<div class="modal-content">
<div class="modal-body">
<div class="nombre-datos">
<img class="imagen-modal" src="media/buscadoresInternet/google.png" alt="Bing">
<p><b>Google</b> es sin duda el mejor buscador actualmente, ya que mantiene estrictos estándares de
calidad a lo largo de sus productos y permite una búsqueda sumamente personalizada.</p>
<p class="text-right">Usar ahora</p>
<div class="valoracion">
<p>Valoración: <b>10</b></p>
</div>
<div class="filtros">
<p>¿Requiere internet?: <b>Sí</b></p>
<p>¿Gratuito?: <b>Sí</b></p>
<p>Pagos integrados: <b>No</b></p>
</div>
</div>
<div class="mas-datos">
<div class="so text-center">
<p>Sistema operativo</p>
<ul>
<li>Windows</li>
<li>OSX</li>
<li>Linux</li>
<li>Android</li>
<li>iOS</li>
</ul>
</div>
<div class="hardsoft-xtra text-center">
<p>Hardware/Software extra</p>
<ul>
<li>Un navegador web (prueba buscando uno en este mismo catálogo).</li>
</ul>
</div>
<div class="nivel text-center">
<p>Nivel educativo</p>
<ul>
<li>Primaria</li>
<li>Secundaria</li>
<li>Preparatoria</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Fin del modal de Google-->
Set vertical-align as top for them.
vertical-align:top;

How to write text after a circle with a number in it

So,I'm struggling to solve a strange thing that happens in my html code.
I've been trying to do this for 3 days or maybe more but I simply cannot find out the 'problem'.
.variola {
max-width: 100%;
margin-top: 0.5em;
margin-bottom: 1em;
-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 20px;
background: white;
border: 1px solid #CCC;
border-bottom-left-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
padding: 8px;
"
}
</style> <style> .cerculet {
display: block;
font-size: 120%;
line-height: 145%;
width: 1.6em;
height: 1.6em;
text-align: center;
border-radius: 50%;
background-color: black;
color: white;
white-space: nowrap;
}
</style> <style> .introducere {
display: table-cell;
vertical-align length: 5;
padding-left: 3em;
padding-top: 0.1em;
}
<!DOCTYPE html>
<html>
<head>
<!-- Aici va fi scris orice cod CSS pentru ca ulterior sa fie "preluat" intr-un
mod indirect de catre codul HTML pentru imbogatirea paginii web. -->
<title>10 cele mai periculoase boli care au facut istorie</title>
</head>
<body>
10 cele mai periculoase boli care au facut istorie
<!-- Tot codul de la tag-ul "body" deschis pana la "body" inchis este strict
codul pentru pagina web.Cei in head sub tag-ul "style" este cod in CSS si
nu va aparea in pagina web,ci va "imbogati" intr-un mod indirect codul html -->
<p style="text-align: left">
<img align="absmiddle" src="http://s2.postimg.org/6zkw8piph/Time.png">26-Martie-2015
<!-- "&nbsp" este un cod important folosit pentru a crea un blank(spatiu alb)
intre 2 caractere -->
<img align="absmiddle" src="http://s29.postimg.org/tkzbm9nwz/Domeniu.png">Biologie
<br>
<img align="absmiddle" src="http://s22.postimg.org/k7tec39x9/Tags.png">Tags: Pandemii, cele mai periculoase</p>
<hr noshade size="2" style="text-align: left" width="47%">
<br>
<!-- Cu ajutorul tag-ului "hr" se pot introduce linii in pagina web.
"noshade" inseamna ca linia nu o sa aiba contur. -->
<h2></h2>
<div class="cerculet">
<div>
<h2>1 </h2>
<div>
<h2>
<big style="font-weight: bold">A ucis mai mult de 300 de
milioane de oameni<br>
din intreaga lume in secolul al XX-lea si pe cei<br>
mai multi locuitori nativi ai Americii.</big>
<!-- Exact ceea ce spuneam mai sus:codul CSS va fi "preluat" indirect din "head"
si va fi introdus in codul html,combinand cele 2 limbaje. -->
<!-- :-) --></h2>
</div>
</div>
</div>
<br>
<div>
Variola(cunoscuta si sub numele latin "Variola" sau "Variola vera") este o boala contagioasa
<br>unica oamenilor.Variola este cauza fie de virusul numit Variola Major,fie de cel numit Variola
<br>minor.Forma mai letala,V. Major,are o mortalitate de 30-35%,pe cand V. Minor este o forma
<br>mai usoara a bolii numita alastrim si ucide ~1% din victimele sale.Efectele secundare
<br>de termen lung pentru supravietuitori includ cicatrici pe piele.Alte efecte secundare ocazionale
<br>includ orbire datorita ulcerului de cornee si infertilitate la persoanele de sex masculin.
</div>
<!-- Tag-ul "br" sectioneaza textul nostru din pagina web in paragrafe. -->
<br>
<br>
<div>
<b>Variola a ucis aproximativ 60 de milioane de europeni,</b> incluzand cinci monarhi
<br>care conduceau Europa in secolul al XVIII-lea.Pana la 30% din cei infectati,80% fiind copii sub 5
<br>ani,au murit datorita acestei boli si inca o treime din supravietuitori au devenit orbi.
</div>
<br>
<br>
<div>
Cat despre tarile din America,dupa primul contact cu europenii si africanii,unii au crezut ca rata
<br>de mortalitate de 90-95% a populatiei native din Lumea Noua a fost cauza de boala Lumii Vechi.
<br>Se suspecteaza ca variola a fost principalul vinovat si raspunzator pentru uciderea a aproape toti
<br>locuitorii nativi ai Americii.In Mexic,cand aztecii s-au angajat in rascoala impotriva lui Cortés,
<br>depasiti numeric,spaniolii au fost fortati sa fuga.In timpul luptei,un soldat spaniol purtator de
<br>variola a murit.Dupa lupta,aztecii au contractat virusul din cadavrele invadatorilor.Cand Cortés
<br>s-a intors in capitala,variola a devastat populatia azteca.A ucis o mare parte din armata azteca,
<br>imparatul si 25% din populatia normala.Ulterior,Cortés a infrant cu usurinta aztecii si a intrat in
<br>Tenochtitlán unde a aflat ca variola a ucis mai multi azteci decat au ucis tunurile.
</div>
<br>
<br>
<div>
Variola a fost responsabila pentru aproximativ 300-500 de milioane de decese in secolul al XX-lea.
<br>Nu mai tarziu de 1967, Organizatia Mondiala a Sanatatii (OMS) a estimat ca 15 milioane de persoane
<br>au contractat virusul si ca alte doua milioane au murit in acel an.Dupa campanii de vaccinare incheiate
<br>cu succes in timpul secolelor XIX si XX,OMS-ul a oficializat eradicarea variolei in 1979.Pana in ziua de
<br>astazi,variola este singura boala infectioasa care a fost complet eradicata din natura.
</div>
<img class="variola" src="http://s3.postimg.org/cb0l49sw3/Variola.jpg" style="position:absolute; left:150px;">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="cerculet">
<div style="font-family: Cambria; font-size: 120%">
2
</div>
</div>
<!-- Aici am folosit CSS-ul pentru a da un stil imaginii urmat de codul
html specific imaginii "style="position...." pentru a aseza imaginea in pozitia
dorita de mine -->
</body>
</html>
As you can see, after the number 1(colored in black,in a circle),there's a LOT of space that I don't want.
The alignment is not good too.I used lots of &nbsp and <br>'s just because I can't find a way to put the text immediately after the number 1. I'm trying to make a "site" for a school project and I am allowed to see other sites to "inspire" myself.You can check http://www.oddee.com/item_90608.aspx
and see what I'm trying to "copy" in some kind of way.
Please help.
In short, you want to float: left the number/circle so that the content wraps around it. You also have several unnecessary elements and, like you mentioned, unnecessary elements - below, I've cleaned the example down to a bare-bones working example.
.cerculet {
display: block;
}
.cerculet:after {
display: block;
clear: both;
content: ' ';
}
.cerculet p{
font-weight: bold;
}
.cerculet h2{
font-size: 120%;
line-height: 145%;
width: 1.6em;
height: 1.6em;
text-align: center;
border-radius: 50%;
background-color: black;
color: white;
white-space: nowrap;
float: left;
margin-right: 15px;
}
<div class="cerculet">
<h2>1 </h1>
<p>A ucis mai mult de 300 de milioane de oameni din intreaga lume in secolul al XX-lea si pe cei mai multi locuitori nativi ai Americii.
</p>
</div>
<p>Variola(cunoscuta si sub numele latin "Variola" sau "Variola vera") este o boala contagioasa unica oamenilor.Variola este cauza fie de virusul numit Variola Major,fie de cel numit Variola minor.Forma mai letala,V. Major,are o mortalitate de 30-35%,pe cand V. Minor este o forma mai usoara a bolii numita alastrim si ucide ~1% din victimele sale.Efectele secundare de termen lung pentru supravietuitori includ cicatrici pe piele.Alte efecte secundare ocazionale includ orbire datorita ulcerului de cornee si infertilitate la persoanele de sex masculin.
</p>
<p><b>Variola a ucis aproximativ 60 de milioane de europeni,</b> incluzand cinci monarhi care conduceau Europa in secolul al XVIII-lea.Pana la 30% din cei infectati,80% fiind copii sub 5 ani,au murit datorita acestei boli si inca o treime din supravietuitori au devenit orbi.
</p>

html, body: 100% not working

I have a page with a simple structure, have a lot of divs repeating same content (text-and two images), i need this to print a image that doesnt repeat in firefox only, heres an example:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">
<title>Cupones de descuento</title>
</head>
<body>
<div class="content">
<!---------------------------------------CUPON TURISTA--------------------------------------->
<img src="img/cortesup.png" class="corte" />
<div class="cupon">
<div class="logo"><img src="img/logobuzios.png" class="logobuzios" alt="logobuzios" /></div>
<div class="cont">
<h3>CUPON N°:</h3>
<p>Nombre:</p>
<p>DNI:</p>
<p class="info">Válido desde DD/MM/AA hasta DD/MM/AA</p>
<img src="img/separador.png" class="separador" alt="separador"/>
<h3>MENÚ TURISTA</h3>
<p>VÁLIDO PARA: 1 (UN) ALMUERZO O CENA</p>
<p class="turista">Menú Turista: Incluye 1 (un) plato de entrada a elección + Incluye 3 (tres)
opciones de plato principal + Incluye 1 (un) postre a elección.<br />
NO Incluye Bebida. Horario de atención: 12 a 21:30 hs.</p>
<img src="img/separadordos.png" class="separador" alt="separador"/>
<p class="restaurant"><strong>RESTAURANTES ASOCIADOS:</strong> CLUB LA PLAGE - DON JUAN - BAR DO MANGUE - BUZIN -
ENU SUSHI - LA DOLCE VITA - PATIO HAVANA - NOI - PURO SABOR - SAN TELMO - DONA FLOR
MINEIROS GRILL - LORENZO - RINCON - PARVATI.</p>
</div>
<div class="pie">
<p class="asociados">Visite nuestro listado de <strong>Restaurantes Asociados</strong></p>
<img src="img/cubiertos.png" class="cubiertos" alt="cubiertos"/>
<p class="web">www.grupobuziosgourmet.com</p>
</div>
</div>
<!--Datos útiles-->
<div class="datos">
<div class="datoshead">
<p class="datosutiles">DATOS ÚTILES</p>
</div>
<p class="utiles">El pasajero titular deberá presentar el o los vouchers impresos en el restaurante que haya seleccionado para consumir.<br />
<strong>UBICACIÓN DE RESTAURANTES:</strong><br />
<strong>CENTRO DE BÚZIOS:</strong> DON JUAN - BUZIN - LA DOLCE VITA - ENU SUSHI - PATIO HAVANA - NOI - PARVATI - PURO SABOR - MINEIROS GRILL - LORENZO.<br />
<strong>JOÃO FERNANDES:</strong> CLUB LA PLAGE - DONA FLOR.<br />
<strong>MANGUINHOS:</strong> BAR DO MANGUE (PORTO DA BARRA).<br />
<strong>ORLA BARDOT:</strong> MATAHARI - RINCON (CENTRO).<br />
<strong>FERRADURA:</strong> SAN TELMO (SOBRE AV. PRINCIPAL).<br />
<strong>HORARIO DE ATENCIÓN:</strong><br />
Todos los restaurantes asociados a Grupo Búzios Resto atienden de 12 a 21.30HS.
<strong>Excepto Club La Plage (sólo almuerzo con bebida + 1 café o caipirinha de cortesía) de 12 a 16 hs. Dona Flor (sólo cena) de 18 a 21.30 hs.</strong>
Ante cualquier inconveniente podrá comunicarse de L a V al tel. +5411-5275-0075 y a nuestro servicio de guardia los fines de semana: Cel. Búzios: +0055-22 9227-8174 / +0055-22 99282-2067
</p>
</div>
I have tried to put the height: 100%; and min-height too 100% to body and html, , at the div container too, but still not working.
Thanks!
You just try this.
html{
height: 100%;
}
body {
min-height: 100%;
}
Refer this url:
Make body have 100% of the browser height
i updated your fiddle:
you gotta remove the height: 100% from html and body and use it like this:
body {float: left;}
#content {float: left;}
https://jsfiddle.net/7x32pna7/1/
hope that helps
Try:
body {float: left;
margin: 0px;
height: 100%;
width: 100%;
}

CSS and HTML coding suggestion for a background image header

I'm very new at CSS and i want to put a header on to my new web site.
A simple one, only an image who goes on the top background. I really don't know how to do it with out much coding.
So, this is what i have, and this is what i want. And at the end of this question is the code of the actual page. Any ideas? Thanks so munch!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es-ES">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Tablon</title>
<link rel="stylesheet" href="LIB/main.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="LIB/titulos.css">
<!--[if IE]>
<link rel="stylesheet" href="LIB/ie.css" type="text/css" media="screen" />
<![endif]-->
<style type="text/css">
.style1 {
text-align: right;
}
.style2 {
vertical-align: top;
margin-top: 3pt;
margin-bottom: 3pt;
}
#apDiv1 {
position:absolute;
left:116px;
top:398px;
width:800px;
height:37px;
z-index:1;
text-align: center;
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
}
</style>
</head>
<body>
<script type="text/javascript" src="JS/jquery-1.3.2.js"></script>
<marquee>
</marquee>
<div class="wrapper">
<p> </p>
<p><br />
</p>
<center> </center>
<div class="aux">
<div id="container">
<ul class="menu">
<li id="noticias" class="active">Mensajes</li>
<li id="tutoriales">Profesores</li>
<li id="enlaces">Enlaces</li>
</ul>
<span class="clear"></span>
<div class="content noticias">
<h3>Ultimos mensajes</h3>
<br />
<div class="style1" style="vertical-align: middle; text-align: right; background-color: #1E1E1E; height: 21px;">
<img alt="" height="16" src="IMG/feed16.png" width="16" class="style2" />
Subscribirce al canal RSS
</div>
<ul>
<br>
<div id="todo">
<div id="foto" style="float: left;width: 86px;height: 80px;padding: 3px">
<IMG src="http://www.gravatar.com/avatar/78bb533a50590a8414a496e2ee57420a?size=80" alt="-" />
</div>
<div id="sms" style="height: 86px;background-color: #1E1E1E;">
djsoftlayer: Este texto sera utilizado para probar el formato de las comillas quote1 y quote2 cuando lo que se escribe es suficiente texto como para copar los 300 caracteres, o al menos una gran parte de los 300, ya no me queda mas nada que decir, asi que voy a tratar de llegar a 300 hablando paja, paja, ya lleg
</div>
</div>
<div id="comenta" style="width:30%;float: right;"> <a href="comments.php?ref=44&autor=djsoftlayer&foto=http://www.gravatar.com/avatar/78bb533a50590a8414a496e2ee57420a?size=80&sms=Este texto sera utilizado para probar el formato de las comillas quote1 y quote2 cuando lo que se escribe es suficiente texto como para copar los 300 caracteres, o al menos una gran parte de los 300, ya no me queda mas nada que decir, asi que voy a tratar de llegar a 300 hablando paja, paja, ya lleg">
<img alt="" height="16" src="IMG/comen16esp.png" width="64" style="float: right" /></a></div>
<br><div id="todo">
<div id="foto" style="float: left;width: 86px;height: 80px;padding: 3px">
<IMG src="http://www.gravatar.com/avatar/78bb533a50590a8414a496e2ee57420a?size=80" alt="-" />
</div>
<div id="sms" style="height: 86px;background-color: #1E1E1E;">
djsoftlayer: testing
</div>
</div>
<div id="comenta" style="width:30%;float: right;"> <a href="comments.php?ref=43&autor=djsoftlayer&foto=http://www.gravatar.com/avatar/78bb533a50590a8414a496e2ee57420a?size=80&sms=testing">
<img alt="" height="16" src="IMG/comen16esp.png" width="64" style="float: right" /></a></div>
<br><div id="todo">
<div id="foto" style="float: left;width: 86px;height: 80px;padding: 3px">
<IMG src="http://www.gravatar.com/avatar/e830bd0ff9aae265d91fe554eb65a61f?size=80" alt="-" />
</div>
<div id="sms" style="height: 86px;background-color: #1E1E1E;">
nata: grande
</div>
</div>
<div id="comenta" style="width:30%;float: right;"> <a href="comments.php?ref=42&autor=nata&foto=http://www.gravatar.com/avatar/e830bd0ff9aae265d91fe554eb65a61f?size=80&sms=grande">
<img alt="" height="16" src="IMG/comen16esp.png" width="64" style="float: right" /></a></div>
<br> </ul>
</div>
<div class="content tutoriales">
<h3>Profesores</h3>
<ul>
<br><li><IMG src="IMG/bullet.png" alt="-" />djsoftlayer</li><li><IMG src="IMG/bullet.png" alt="-" />nata</li><body style="background-image: url('IMG/bg.png')">
</ul>
</div>
<div class="content enlaces">
<h3>Deberías Visitar...</h3>
<ul>
<li><IMG src="IMG/bullet.png" alt="-" /> www.plusmusica.com - Online jukebox!</li>
<li><IMG src="IMG/bullet.png" alt="-" /> www.cokidoo.com - Nuestra startup! :)</li>
<li><IMG src="IMG/bullet.png" alt="-" /> www.pixelartgames.com - Te gustan los juegos pixel art? ;)</li>
<li><IMG src="IMG/bullet.png" alt="-" /> www.dmsconsulting.es - Anterior empresa</li>
</ul>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="JS/tabs.js"></script>
</body>
</html>
Here is the basic html structure you have
<body>
<div id="wrapper">
<div id="container">
<p>content</p>
</div>
</div>
</body>
Here is the basic css you need to place your banner image:
#wrapper {
width: 600px; /* this is the width of your background image */
background: url(/path/to/image.jpg); /* this sets the div background as an image */
margin: 0px auto; /* this centers the div */
padding-top: 20px; /* this "pads" the div 20px on the top */
}
#container {
width: 400px; /* this sets the width of the container, it is narrower than the wrapper div to get the effect you are looking for */
margin: 0px auto; /* to center the div with the div#wrapper */
}
A bit more information on the CSS would be good. In your "what you want" link there is an specified width -- there needs to be a wrapping element on the page (possibly your #wrapper division), then do something like:
background: url(/link/to/background/image.ext)
And you'll be set.
You're going to like CSS after you get used to it. The section like this:
<p> </p>
<p><br />
</p>
<center> </center>
can be completely replaced with a little padding-top or margin-top setting like this:
.wrapper {
padding-top: 25px;
To address your question, Kerry was on the mark. Set the background property, specifying the url similarly to as he advises to get your desired effect. You probably want to do this on your wrapper class. Algo asi:
background-image: url('relative/path/toImage.png');
background-repeat:no-repeat;
background-position:center top;
}
See this for more. Enjoy!
Others have answered your question, but I'd like to add that there are a couple things I'd do to improve your HTML code.
Move the Javascript tag which loads jQuery to the last line before . The current position will block rendering until the script has loaded.
<script type="text/javascript" src="JS/jquery-1.3.2.js"></script>
<script type="text/javascript" src="JS/tabs.js"></script>
</body>
Get rid of the , tags (and center your #wrapper as superUntitled proposes)
Good luck!