Fero
Fero

Reputation: 13315

How to make icon to be displayed in the fixed place in my site?

I have fixed an icon in the place using jQuery

$('#edit').css({left:  512});

When i make the browser size small or big the icon is not on the same place. It's moving according to that current browser size.

How can it be controlled using jQuery to place icon in the same place even the browser size changes.

Upvotes: 0

Views: 211

Answers (3)

Samidjo
Samidjo

Reputation: 2355

In the css class put :

.logoClass { position : fixed; }

Upvotes: 1

Saeed Neamati
Saeed Neamati

Reputation: 35842

Why not using CSS instead of jQuery? Simply use fixed positioning.

Upvotes: 2

Johannes Lund
Johannes Lund

Reputation: 1917

Try setting 'position :fixed;'

Upvotes: 0

Related Questions