CSS Style not applied in HTML
I have the following HTML Code which style I want to include in a CSS in a
different file
<div id="leftPanel" style="background-color:grey;
margin-left:7px;
margin-top:7px;
float:left;">
<img src="images/fa.png">
</div>
<div id="right" style="font-size:72%;float:left;
margin-left:15px;margin-top:15px">
Lorem Ipsum Text oder Claim<br>gerne auch mehrzeilig
</div>
Which looks like this:
Now if I try to insert the style in a separate CSS, like this:
#leftPanel {
background-color:grey;
margin-left:7px;
margin-top:7px;
float:left;
}
And in the HTML:
<link rel="stylesheet" href="css/style.css"/>
<div id="leftPanel">
<img src="images/fa.png">
</div>
Then the position is changed, getting this result:
No comments:
Post a Comment