Amar Ryder
Amar Ryder

Reputation: 3

Div under div css not working

I am trying following code for executing one alignment of boxes in right side with two adjacent box in row, please check below code why that main DIV class list_right css in not executing.

Fiddle link.

<style>
.list_right {
    float:right;
    padding:40px 5px 0px 0px;
    width:37%;
    position:relative;
}
.part_1 {
    width:50%;
    float:left;
    line-height: 1.7;
}
.logos {
    float: left;
    width:160px;
    margin-left:0px;
    margin-bottom:8px;
    padding-left: 45px;
    padding-top: 1px;
    padding-bottom: 3px;
    text-decoration: none;
    font-family:'Volkhov', arial;
    font-size: 19px;
    letter-spacing: 1.3px;
    line-height: 2.14;
    color: #6d6e71;
    border: 1px solid;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    -webkit-box-shadow: #666 0px 2px 3px;
    -moz-box-shadow: #666 0px 2px 3px;
    box-shadow: #666 0px 2px 3px;
    border-color: #41c7ee;
    behavior: url(/css/pie/PIE.htc);
}
.logos:hover {
    border-color: #6d6e71;
    background-color: #41c7ee !important;
    color: #ffffff !important;
    text-decoration: none !important;
}
.site_1 {
    background-image: url(http://i.imgur.com/ndWHvar.png) !important;
    background-color: #f1f1f1 !important;
    background-repeat:no-repeat !important;
    background-position: 0px -5px !important;
    height:36px;
}
.site_2 {
    background-image: url(http://i.imgur.com/ndWHvar.png) !important;
    background-color: #f1f1f1 !important;
    background-repeat:no-repeat !important;
    background-position: 0px -5px !important;
    height:36px;
}
</style>
<div class="list_right">
<div class="part_1"> 
<a href="/" class="logos site_1">Sites</a>
</div>
<div class="part_1">	
<a href="/" class="logos site_2">Sites</a>
</div>
<div class="d_hidden">

</div>
<div class="clear_both">

</div>

Upvotes: 0

Views: 119

Answers (2)

Danield
Danield

Reputation: 125413

You have <style> tags in your css in your original fiddle link which demonstrates the problem your were having.

Delete them, they shouldn't be there.

That's what's interfering with the list_right class.

FIDDLE

Upvotes: 0

Gho
Gho

Reputation: 568

Seems to me (from your code) that you are not closing the list_right tag. Close it and it should work properly... try to indent your code, make it look more clean, so that in the future you will be able to see the problems yourself.

Upvotes: 1

Related Questions