Reputation:
I have some divs that won't show up, no matter what I do.
The relevant divs have the class 'baumX', where X is the number of the div.
<div class='pachten'>
<div class='pachtlogo'><img src='_img/zeigen.png'></div>
<h1>some header</h1>
<p>some text</p>
<p>some more text</p>
<div class='pachtimg'><!-- Some img that gets added later --></div>
<p>text again</p>
<div class='baum 1'> <!-- Some img that gets added later --></div>
</div>
My CSS:
.pachten {
margin-top: 0.5em;
background-color: #FFC734 ;
}
.baum1 , .baum2 , .baum3 , .baum4 {
min-width: 15%;
min-heigth: 15%;
background-color:#fff;
}
.baum1 {
border-left:4 px solid #fff;
border-top:4 px solid #fff;
float:right;
}
.pachtlogo and .pachtimg are empty so far, their css gets added later.
Even when I put some content into the div, the content shows but the div doesn't.
EDIT: Solved, simply a typo. Gonna delete the question when it's marked solved to give you guys some rep for showing me how stupid one can be.
Upvotes: 0
Views: 111
Reputation: 255
Ok, so class baum1 and baum 1 are totally different! In your div you have class="baum 1"
notice the space in between, That makes it so there are 2 classes. class .baum
and class .1
.
Just remove the space in your div and your style sheet should see that is class .baum1
.
<div class='pachten'>
<div class='pachtlogo'><img src='_img/zeigen.png'></div>
<h1>some header</h1>
<p>some text</p>
<p>some more text</p>
<div class='pachtimg'><!-- Some img that gets added later --></div>
<p>text again</p>
<div class='baum1'> <!-- Some img that gets added later --></div>
Upvotes: 3
Reputation: 4305
This:
<div class='baum 1'> <!-- Some img that gets added later --></div>
Should be this:
<div class='baum1'> <!-- Some img that gets added later --></div>
The space in your class name made it not match the one you defined in your CSS.
Upvotes: 0