I want to have my <p> next to each other - html

I have a question, I'm working on a site and I want this in my website:
Showing at my page at the moment:
De diensten die wij verlenen op het gebied van beveiligde opbergsystemen zijn:
• Openen
• Reparatie
• 24 op 24 en 7 op 7!
• Service
• Transport
I want to have the • and the text next to each other. Now they are below each other
the code :
<p class="second">De diensten die wij verlenen op het gebied van beveiligde
opbergsystemen zijn:</p>
<p class="second">•</p><p class="first"> Openen</p>
<br>
<p class="second">•</p><p class="first"> Reparatie</p>
<br>
<p class="second">•</p><p class="first"> 24 op 24 en 7 op 7!</p>
<br>
<p class="second">•</p><p class="first"> Service</p>
<br>
<p class="second">•</p><p class="first"> Transport</p>
The text is dutch so don't mind that

Use <ul> tag
<ul>
<li> Openen</li>
<li> Reparatie</li>
<li> 24 op 24 en 7 op 7!</li>
<li> Service</li>
<li> Transport</li>
</ul>

Have you tryed this?
<p class="first"><span class="second">•</span>Openen</p>
<p class="first"><span class="second">•</span>Reparatie</p>

Every time you use "[p]" that creates a new paragraph.
"[br]" makes a new break in the line and moves the next set of text to the next line.
So here
<p class="second">•</p><p class="first"> Openen</p>
you are creating a new paragraph and then • follow by a new paragraph.
That is why your • 's are above eachother.

use this
<div id="container">
<p class="second">De diensten die wij verlenen op het gebied van beveiligde
opbergsystemen zijn:</p>
<ul>
<li>
<p> Openen</p>
</li>
<li>
<p> Reparatie</p>
</li>
<li>
<p> 24 op 24 en 7 op 7!</p>
</li>
<li>
<p> Service</p>
</li>
<li>
<p> transport</p>
</li>
</ul>
</div>
and your css is:
#container li
{
float left;
}
will automatically add your bullet to text.

Related

How do I position the hr element to a specific location?

I have the problem that I want to have the hr element on my website under a text but I don't really know how to do it, I've already googled it so I hope someone can help me here is my problem
I created the hr element and just wanted it to be 50% and now I want it at the bottom above a text
I thought that the hr element would be just a little bit over the Text
<hr style="width:50%; text-align:bottom" />
<div class="footer">
Gemacht mit <span class="herz">❤</span> von
<a href="https://fastdropgaming.github.io">
<span class="fl">FastDrop Gaming</span>
</a>
<div>
<small>© <script src="assets/js/year.js"></script> FastDrop Gaming. Alle Rechte vorbehalten.</small>
</div>
<div>
<small></span>Impressum ● Kontakt ● >Datenschutz</div></small>
</div>
Apparently, in your real code (which you didn't post here completely, but which is what produces the screenshot you added), your footer has a fixed position (or something similar) at the bottom. So simply move the hr tag inside the .footer div to make it part of that footer (i.e. at the bottom):
.footer {
position: fixed;
bottom: 0;
}
<div class="footer">
<hr style="width:50%; text-align:bottom" /> Gemacht mit <span class="herz">❤</span> von <span class="fl">FastDrop Gaming</span>
<div>
<small>© <script src="assets/js/year.js"></script> FastDrop Gaming. Alle Rechte vorbehalten.</small></div>
<div><small></span>Impressum ● Kontakt ● >Datenschutz</div></small>
</div>
you should put the hr inside the general div "footer" :
<div class="footer">
<hr style="width:50%; text-align:bottom" />
Gemacht mit <span class="herz">❤</span> von <span class="fl">FastDrop Gaming</span>
<div>
<small>© <script src="assets/js/year.js"></script> FastDrop Gaming. Alle Rechte vorbehalten.</small></div>
<div><small></span>Impressum ● Kontakt ● >Datenschutz</div></small>
</div>

What should be the proper HTML element for a list item title

I have a list of items where each one have a title and a subtitle, something like
<h2>Here's my section with some items
<ul>
<li>
<em>Item title</em>
<p>Item subtitle</p>
</li>
<li>
<em>Item title 2</em>
<p>Item subtitle 2</p>
</li>
<li>
<em>Item title 3</em>
<p>Item subtitle 3</p>
</li>
</ul>
So here's the question: what HTML element should contain item title?
Thanks!
** EDIT **:
I'm trying to figure out which HTML element is the proper HTML element for this function (being a list item title)
i believe what you looking for is the proper usage of HTML 5 Semantic Elements. Your code with ul, ol and li is fine, its to create list, but if you want to really define it as title and description (i take it as description because you write in paragraph tag), you can use dl, dt and dd w3school explaination. Here are my example.
<h2>Here's my section with some items
<dl>
<dt>Item title</dt>
<dd>Item subtitle</dd>
<dt>Item title 2</dt>
<dd>Item subtitle 2</dd>
<dt>Item title 3</dt>
<dd>Item subtitle 3</dd>
</dl>
Please let me know if you have further question.
Hi Bueno !, after you gave me the example of what you trying to achieve now i can narrowed down the tag. In my perspective i will use this semantic tags :
<section>
<header>
<h2>Diferenciais Adentro Cloud</h2>
<p>Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura</p>
<ul>
<li>
<figure>
<img/>
<figcaption>
<h3>Segurança</h3>
<p>Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura</p>
</figcaption>
</figure>
</li>
<li>
<figure>
<img/>
<figcaption>
<h3>Data Center</h3>
<p>Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura</p>
</figcaption>
</figure>
</li>
<li>
<figure>
<img/>
<figcaption>
<h3>Suporte</h3>
<p>Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura Conheça as vantagens de ser cliente Adentro Cloud, a qualidade e atendimento diferenciado que sua empresa procura</p>
</figcaption>
</figure>
</li>
</ul>
</header>
</section>
Note : Bueno's example of website website example, look for Diferenciais Adentro Cloud.
Is this what you were going for?
<h1>Here's my section with some items</h1>
<ul>
<li>
<h2>Item title</h2>
<p>Item subtitle</p>
</li>
<li>
<h2>Item title 2</h2>
<p>Item subtitle 2</p>
</li>
<li>
<h2>Item title 3</h2>
<p>Item subtitle 3</p>
</li>
</ul>
or did you want this
<h2>Here's my section with some items</h2>
<ul>
<li>
<em>Item title</em>
<p>Item subtitle</p>
</li>
<li>
<em>Item title 2</em>
<p>Item subtitle 2</p>
</li>
<li>
<em>Item title 3</em>
<p>Item subtitle 3</p>
</li>
</ul>
Either way you forgot a closing tag for H2 it should be
If you want to give meaning to the titles..
First of all, add an </h2>.
Then use a class to give your elements a name or a group:
<h2>Here's my section with some items</h2>
<ul>
<li>
<em class="itemTitle">Item title</em>
<p>Item subtitle</p>
</li>
<li>
<em class="itemTitle">Item title 2</em>
<p>Item subtitle 2</p>
</li>
<li>
<em class="itemTitle">Item title 3</em>
<p>Item subtitle 3</p>
</li>
</ul>
With the class, you can then add css using
.itemTitle {
/* some css code */
}
A class allows multiple elements to have the same grouping, whereas an id allows only a unique name (which, in some cases, is what you will need).

How to set a specific div end?

im working on a project for myself and im stuck at this point:
<div id="opacity">
<div id="content">
<div id="text">
<h1 id="contentH1">Officiele game-rate website.</h1>
<br>
<p id="contentP1">Op deze website kunt u alle top 10 games zien, van veel verschillende genre's. Alle lijsten zijn bedoeld voor de pc. </p>
<p id="contentP2">Hier onder worden de verschillende genre's aangegeven:</p>
<ul id="genreIndeling">
<li>Actie</li>
<li>Avontuur</li>
<li>Strategie</li>
<li>RPG</li>
<li>Sport</li>
<li>Race</li>
</ul>
</div><!--END TEXT-->
</div><!--END OPACITY-->
<div id="messi">
<img id="messi" src="messi.png" alt="Messi" style="opacity: 1;">
</div><!--END MESSI-->
</div><!--END CONTENT-->
Sorry for the Dutch words, but the problem is that my pc, the end div of "content" sees as the end div of "opacity", so my picture got still opacity.
Can anybody help me please?
Thanks,
Joost Keizer
You are missing a closing "/div" for opacity
Swap the ids of your first two divs:
<div id="content">
<div id="opacity">
This will put your divs in order and keep the image the way you want.

dompdf line heigth different from source

I am trying to create a pdf using dompdf v0.6.1-4. However i ran into the following weirdness when creating the pdf. The line height looks to be completely ignored by dompdf on a table. Every row gets like a 100 pixel height. That is not how i want it to be.
Here is the html
<!doctype HTML>
<head>
<title>
voucher pdf
</title>
<style>
#wrapper{
width: 800px;
background-color: white;
}
#vouchercode{
font-weight: bolder;
}
#customerlogo img{
width: 400px;
height: 285px;
}
#topleftimgdescr{
text-align: center;
vertical-align: center;
font-weight: bold;
}
#maxwifihref{
text-align: center;
}
#maxwifiimg img{
width: 170px;
height: 75px;
}
#nl{
height: 130px;
}
.countrytext{
margin-left: 8px;
font-weight: bolder;
color: white;
font-size: 30px;
font-family: "Verdana", Arial, sans-serif;
}
.countrypng{
width: 60px;
}
.partial{
height: 140px;
}
.instruction{
margin-left: 60px;
display: inline-block;
font-size: 14px;
}
ul {
margin-top: 0px;
}
#pagebreak{
page-break-after: always;
}
</style>
</head>
<body>
<div id="wrapper">
<table>
<tr>
<td rowspan="5" width="400px" colspan="1" style="text-align: center;">
<img id="customerlogo" src="./assets/images/logo_krieghuus.png" alt="" /><br />
<label style="text-align: center;" id="topleftimgdescr">Vakantiepark de “Krieghuusbelten”</label>
</td>
<td colspan="3" style="text-align: right; vertical-align: top;">
<img id="maxwifilogo" src="./assets/images/maxwifi.png" alt="" /><br />
<label id="maxwifihref" style="margin-right: 50px;"><a>www.maxCoax.nl</a></label>
</td>
</tr>
<tr style="height: 25px;">
<td colspan="3">Wifi activationcode</td>
</tr>
<tr style="height: 25px;">
<td colspan="1">Tijdsduur: </td><td colspan="2" id="timelimit">10080 minuten</td>
</tr>
<tr style="height: 25px;">
<td colspan="1">Apparaten: </td><td colspan="2">1</td>
</tr>
<tr style="height: 25px; line-heigth: 12px;">
<td colspan="1">Activatiecode: </td><td colspan="2" id="vouchercode">PnBndxTvYhu</td>
</tr>
</table>
<div id="instructionsection">
<div class="partial">
<div class="countrypng"><img id="nllogo" src="./assets/images/plate.png" alt="" /><div class="countrytext">NL</div></div>
<div class="instruction">
<b>Instructies</b>
<ul>
<li>
Start uw notebook, PDA of PC. Wanneer u binnen het bereik van een wifi hotspot bent kunt u verbinding<br />
maken met het Wifi netwerk. Start internet en de activatiepagina opent.
</li>
<li>
Vul de hierboven vermelde toegangscode in.
</li>
<li>
De tijdsduurgebruik gaat in na activatie.
</li>
<li>
U kunt gebruik maken van internet.
</li>
<li>
<b>Let op!</b> Deze toegangscode is te activeren op 1 apparaat.
</li>
</ul>
</div>
</div>
<div class="partial">
<div class="countrypng"><img id="enlogo" src="./assets/images/plate.png" alt="" /><div class="countrytext">EN</div></div>
<div class="instruction">
<b>Instructions</b>
<ul>
<li>
Start up your notebook, PDA or PC. Please connect with the Wifi network if you are within range of a Wifi access point.
</li>
<li>
Log on to the internet. You will land on the activation page.
</li>
<li>
Enter the above mentioned access code. The duration of use starts after activation.
</li>
<li>
You are now ready to use internet.
</li>
<li>
<b>Attention!</b> This code is for use on 1 device
</li>
</ul>
</div>
</div>
<div class="partial">
<div class="countrypng"><img id="delogo" src="./assets/images/plate.png" alt="" /><div class="countrytext"> D</div></div>
<div class="instruction">
<b>Hinweise</b>
<ul>
<li>
Starten Sie Ihr Notebook, PDA oder Ihren PC. Wenn Sie sich innerhald der Reichweite eines Accespoints befinden,<br />
dan können Sie mit dem drahlosen Netzwerk verbindung machen.<!--haha, machen! -->
</li>
<li>
Starten Sie internet. Sie bekommen den Aktivierungsseite.
</li>
<li>
Geben Sie den oben erwähnten Aktivierungscode ein. Die Dauerder Anwenung startet nach den Aktivierung.
</li>
<li>
Sie können jetzt das Internet benutzen.
</li>
<li>
<b>Achtung<!-- ik ga helemaal stuk hier!-->!</b> Dieser code können sie gleichzeitig aktiveren für den Einsatz auf 1 Gerät.
</li>
</ul>
</div>
</div>
<div id="pagebreak" class="partial">
<div class="countrypng"><img id="frlogo" src="./assets/images/plate.png" alt="" /><div class="countrytext">FR</div></div>
<div class="instruction">
<b>Instructions</b>
<ul>
<li>
Ouvrez Votre portable, PDA ou PC. Lorsque vous êtes dans les environs d’un point d’accès Wifi, vous serez reliés<br />
après quelques secondes automatique au résea Wifi systeme sans fil.
</li>
<li>
Démarrez internet. Alors sur le site du hotel ou camping.
</li>
<li>
Complétez le code d’accès mentionné ci-dessus. La durée d’utilisation commence après l’activation.
</li>
<li>
Vous pourrez maintenant utiliser internet.
</li>
<li>
<b>Attention!</b> Ce code est utilisé sur 1 pèriphèrique
</li>
</ul>
</div>
</div>
</div>
</div>
</body>
Table support in dompdf is acceptable but not very advanced and so complex table layouts can render poorly in dompdf. You might try simplifying your document as much as possible (e.g. by removing colspan/rowspan which do not appear to be necessary).
For example, the following renders a bit better.
#wrapper{
width: 800px;
background-color: white;
}
#vouchercode{
font-weight: bolder;
}
#topleftimgdescr{
vertical-align: middle;
font-weight: bold;
}
#maxwifihref{
text-align: center;
}
#nl{
height: 130px;
}
.countrytext{
font-weight: bolder;
font-size: 30px;
font-family: "Verdana", Arial, sans-serif;
}
.partial{
margin-top: 2em;
min-height: 140px;
page-break-inside: avoid;
}
.instruction{
font-size: 14px;
}
<!doctype HTML>
<head>
<title>
voucher pdf
</title>
</head>
<body>
<div id="wrapper">
<table>
<tr>
<td width="400px" style="text-align: center;">
<img id="customerlogo" src="http://placehold.it/400x285/cc6666/ffffff&text=dompdf"><br />
<label style="text-align: center;" id="topleftimgdescr">Vakantiepark de “Krieghuusbelten”</label>
</td>
<td style="text-align: right; vertical-align: top;">
<img id="maxwifilogo" src="http://placehold.it/175x75/cc6666/ffffff&text=dompdf" alt="" /><br />
<label id="maxwifihref" style="margin-right: 50px;"><a>www.maxCoax.nl</a></label>
<table>
<tr style="height: 25px;">
<td colspan="3">Wifi activationcode</td>
</tr>
<tr style="height: 25px;">
<td colspan="1">Tijdsduur: </td><td colspan="2" id="timelimit">10080 minuten</td>
</tr>
<tr style="height: 25px;">
<td colspan="1">Apparaten: </td><td colspan="2">1</td>
</tr>
<tr style="height: 25px; line-height: 12px;">
<td colspan="1">Activatiecode: </td><td colspan="2" id="vouchercode">PnBndxTvYhu</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="instructionsection">
<div class="partial">
<div class="countrypng"><img id="nllogo" src="http://placehold.it/60x35/cc6666/ffffff&text=dompdf" alt="" /><span class="countrytext">NL</span></div>
<div class="instruction">
<b>Instructies</b>
<ul>
<li>
Start uw notebook, PDA of PC. Wanneer u binnen het bereik van een wifi hotspot bent kunt u verbinding<br />
maken met het Wifi netwerk. Start internet en de activatiepagina opent.
</li>
<li>
Vul de hierboven vermelde toegangscode in.
</li>
<li>
De tijdsduurgebruik gaat in na activatie.
</li>
<li>
U kunt gebruik maken van internet.
</li>
<li>
<b>Let op!</b> Deze toegangscode is te activeren op 1 apparaat.
</li>
</ul>
</div>
</div>
<div class="partial">
<div class="countrypng"><img id="enlogo" src="http://placehold.it/60x35/cc6666/ffffff&text=dompdf" alt="" /><span class="countrytext">EN</span></div>
<div class="instruction">
<b>Instructions</b>
<ul>
<li>
Start up your notebook, PDA or PC. Please connect with the Wifi network if you are within range of a Wifi access point.
</li>
<li>
Log on to the internet. You will land on the activation page.
</li>
<li>
Enter the above mentioned access code. The duration of use starts after activation.
</li>
<li>
You are now ready to use internet.
</li>
<li>
<b>Attention!</b> This code is for use on 1 device
</li>
</ul>
</div>
</div>
<div class="partial">
<div class="countrypng"><img id="delogo" src="http://placehold.it/60x35/cc6666/ffffff&text=dompdf" alt="" /><span class="countrytext"> D</span></div>
<div class="instruction">
<b>Hinweise</b>
<ul>
<li>
Starten Sie Ihr Notebook, PDA oder Ihren PC. Wenn Sie sich innerhald der Reichweite eines Accespoints befinden,<br />
dan können Sie mit dem drahlosen Netzwerk verbindung machen.<!--haha, machen! -->
</li>
<li>
Starten Sie internet. Sie bekommen den Aktivierungsseite.
</li>
<li>
Geben Sie den oben erwähnten Aktivierungscode ein. Die Dauerder Anwenung startet nach den Aktivierung.
</li>
<li>
Sie können jetzt das Internet benutzen.
</li>
<li>
<b>Achtung<!-- ik ga helemaal stuk hier!-->!</b> Dieser code können sie gleichzeitig aktiveren für den Einsatz auf 1 Gerät.
</li>
</ul>
</div>
</div>
<div id="pagebreak" class="partial">
<div class="countrypng"><img id="frlogo" src="http://placehold.it/60x35/cc6666/ffffff&text=dompdf" alt="" /><span class="countrytext">FR</span></div>
<div class="instruction">
<b>Instructions</b>
<ul>
<li>
Ouvrez Votre portable, PDA ou PC. Lorsque vous êtes dans les environs d’un point d’accès Wifi, vous serez reliés<br />
après quelques secondes automatique au résea Wifi systeme sans fil.
</li>
<li>
Démarrez internet. Alors sur le site du hotel ou camping.
</li>
<li>
Complétez le code d’accès mentionné ci-dessus. La durée d’utilisation commence après l’activation.
</li>
<li>
Vous pourrez maintenant utiliser internet.
</li>
<li>
<b>Attention!</b> Ce code est utilisé sur 1 pèriphèrique
</li>
</ul>
</div>
</div>
</div>
</div>
</body>
Notes: There were a few spelling errors and incorrect selectors which I tried to correct. Also, I wasn't sure what you were going for in some of your layout choices, so I just made a decision in those instances.

How to get footer side by side

My footer is one below the other and want it to be side by side. My problem is that it is too much do you have any suggestions how to put in a nice way? it's not the most important side of the site but it is much content and how to put this in a right way?
<h1>Sitemap</h1>
<ul>
<li>Opleiding</li>
<ul>
<li>Visie & Beleid</li>
<li>Opbouw Studieprogramma</li>
<li>Competenties</li>
<li>Diploma</li>
<li>Beroepen</li>
</ul>
<li>Onderwijsprogramma</li>
<ul>
<li>Mededelingen</li>
<li>Uitagenda</li>
<li>Propedeuse</li>
<li>Verdieping 1</li>
<li>Verdieping 2</li>
<li>Afstuderen</li>
</ul>
<li>Organisatie</li>
<ul>
<li>Contact</li>
<li>Blog</li>
<li>Docenten</li>
<li>Onderwijsbureau</li>
<li>Stagebureau</li>
<li>Buitenlandbureau</li>
<li>Examencommissie</li>
<li>Decaan</li>
</ul>
<li>Stages en Projecten</li>
<ul>
<li>Stages</li>
<li>Projecten</li>
</ul>
</ul>
<h1>Contact</h1>
CMD Amsterdam
Bezoekadres: Gebouw Theo Thijssenhuis (TTH), Wibautstraat 2-4, 1091 GM Amsterdam
Postadres: Postbus 1025, 1000 BA Amsterdam
Telefoon: 020 595 1855
Email: info#cmd.hva.nl
RSS: Feed intranet
<h1>Zoeken</h1>
<form>
<input type="text">
<input type="submit">
</form>
<h1>About</h1>
CMD Amsterdam is een ontwerp opleiding voor Interactieve Media.
Op de opleiding Communication & Multimedia Design (CMD) Amsterdam leer je alles over het ontwerpen van online interactieve media. Dit betekent begrijpen, bedenken en maken van interactieve mediatoepassingen zoals websites, mobiele applicaties en interactieve televisie.
<h1>Credits</h1>
© 2007 Hogeschool van Amsterdam - DMCI - CMD Amsterdam
Geef ons feedback
</footer>
CSS!
footer{
width: 100%;
position: absolute;
top: 317%;
left: -10%;
background: lightgrey;
margin:10%;
padding: 2%;
}
footer > ul > li {
width: 20%; /* Make them the right width */
float: left; /* And float them to get them in a line */
}
You have 5 headings in your footer, so I'm guessing you want 5 columns in your footer. I'd put a div around each of your footer sections, and then float them and constrain their widths so they appear side-by-side.
HTML
<footer>
<div class="footer-column">
<h1>Sitemap</h1>
...
</div>
<div class="footer-column">
<h1>Content</h1>
...
</div>
<div class="footer-column">
<h1>Zoeken</h1>
...
</div>
<div class="footer-column">
<h1>About</h1>
...
</div>
<div class="footer-column">
<h1>Credits</h1>
...
</div>
</footer>
CSS
.footer-column {
width: 20%;
float: left;
}
Demo
JSFiddle (Note: This will look terrible on a narrow display).