JMGECH
JMGECH

Reputation: 653

CSS float:right

I am attempting to position two elements in opposite directions. I came across something that seemed to do what I wanted, but I can't seem to float the div to the right.

Could anyone tell me what I'm doing wrong?

In the following, I was expecting section-title to be on the left and feeds to be on the right...

http://jsfiddle.net/n3Dvg/

Tia! S.

Upvotes: 0

Views: 89

Answers (4)

GajendraSinghParihar
GajendraSinghParihar

Reputation: 9131

just add !important after float:right

#section .feeds {
float: right !important;  // to override any conflict 
text-transform: none;
}

Upvotes: 0

sandeep
sandeep

Reputation: 92803

Please correct your styling. Write #section .feeds after #section .section-title, #section .feeds to override your style.

For example Write like this:

#section .section-title, #section .feeds {
 float:left;
            }
            #section .feeds {
                float: right;
                text-transform: none;
            }

Check this http://jsfiddle.net/n3Dvg/8/

Upvotes: 1

noj
noj

Reputation: 6759

You have a float: left in section .section-title, #section .feeds which is conflicting.

Either change that or add !important after the float: right.

Upvotes: 0

Rohit Azad Malik
Rohit Azad Malik

Reputation: 32162

Hi now define css uner id content

as like this

#content #section .feeds{
float:right;
}

Live demo

Upvotes: 0

Related Questions