Ok
i know now that i use a class if elements repeat. And i can use an ID if
they are unique.
I now have a problem.
With ID all is well, but does not validate. So i have to rewrite the
code... but how? I am confused with all the "." and "#". What is the
correct syntax (if any?)
Mark
<part code>
#info {
width:320px;
padding:0;
margin:0;
float:right;
}
#info .omschrijving {
margin:0;
padding:0px 30px 20px 10px;
width:270px;
font-size:75%;
}
#info h2 {
margin:0;
padding:0 0 10px 0px;
width:320px;
}
</part code>
------------------------------------------
<part code html>
<div id="info">
<h2>Item 1</h2>
<p class="omschrij ving">bla bla</p>
</div>
<div id="info">
<h2>Item 2</h2>
<p class="omschrij ving">bla bla</p>
</div>
</part code html>
-------------------------------------------
-------------------------------------------
This does not work:
<part new code html>
<div class="info">
<h2>Item 1</h2>
<p class="omschrij ving">bla bla</p>
</div>
<div class="info">
<h2>Item 2</h2>
<p class="omschrij ving">bla bla</p>
</div>
</part new code html>
------------------------------------------
<new css>
..info {
}
..info .omschrijving {
}
..info h2 {
}
</new css>
i know now that i use a class if elements repeat. And i can use an ID if
they are unique.
I now have a problem.
With ID all is well, but does not validate. So i have to rewrite the
code... but how? I am confused with all the "." and "#". What is the
correct syntax (if any?)
Mark
<part code>
#info {
width:320px;
padding:0;
margin:0;
float:right;
}
#info .omschrijving {
margin:0;
padding:0px 30px 20px 10px;
width:270px;
font-size:75%;
}
#info h2 {
margin:0;
padding:0 0 10px 0px;
width:320px;
}
</part code>
------------------------------------------
<part code html>
<div id="info">
<h2>Item 1</h2>
<p class="omschrij ving">bla bla</p>
</div>
<div id="info">
<h2>Item 2</h2>
<p class="omschrij ving">bla bla</p>
</div>
</part code html>
-------------------------------------------
-------------------------------------------
This does not work:
<part new code html>
<div class="info">
<h2>Item 1</h2>
<p class="omschrij ving">bla bla</p>
</div>
<div class="info">
<h2>Item 2</h2>
<p class="omschrij ving">bla bla</p>
</div>
</part new code html>
------------------------------------------
<new css>
..info {
}
..info .omschrijving {
}
..info h2 {
}
</new css>
Comment