I am creating a webpage in which there is an image on the extreme left when the browser is maximized but as soon as the browser gets minimized i want the image to move to extreme right .. How to do that ? I tried float but it's not working..
Asked
Active
Viewed 944 times
-4
-
1Show your code this may [help](http://jsfiddle.net/) you. – Benjamin Aug 21 '14 at 09:00
-
by minimize do you mean minimized to task bar or the window is made smaller and still visible? – wallop Aug 21 '14 at 09:00
-
minimized or browser width decreased (small display screen)? – 4dgaurav Aug 21 '14 at 09:00
-
Make JS and JQuery handy to do this. – Faisal Ashfaq Aug 21 '14 at 09:02
-
http://www.appenstien.in/website_appenstien/udi.html .. Check this page out and do check it after minimizing... @Benjamin .. after you minimize the browser window the image comes over the content.. i want it to move to extreme right.. thank you – Appenstien Official Aug 21 '14 at 09:03
-
all of you please check the above comment by me.. – Appenstien Official Aug 21 '14 at 09:04
-
@AppenstienOfficial I don't see any image on that page? Do you mean the *Patrons* `
- ` Tag? Could you show some simplified code of the exact problem?
– Sven Rojek Aug 21 '14 at 09:24 -
.prof { position : absolute; top : 210px; left : 200px; } .prof > img { float :left; @media (min-width : 800px) { img { float : right; } } } – Appenstien Official Aug 21 '14 at 11:32
-
It's the CSS @sven rojek – Appenstien Official Aug 21 '14 at 11:32
1 Answers
1
Do you mean minimized to task bar or resize window? because when you minimize to task bar the image don't visible anymore or i miss something? anyway if you mean resize so:
Use Media Queries:
img{
float:right;
}
@media (min-width: 800px) {
img{
float:left;
}
}
This cause to image float:right
until window's width is under 800px and if the browser's width resize to larger than 800px, the image change to float:left

Moshtaf
- 4,833
- 2
- 24
- 34
-
Moshtaf : .prof { position : absolute; top : 210px; left : 200px; } .prof > img { float :left; @media (min-width : 800px) { img { float : right; } } } – Appenstien Official Aug 21 '14 at 11:33
-
-
-
http://www.appenstien.in/website_appenstien/roh.html ... Can you check this page.. minimize it and figure out the problem please.. it'd be a great help .. Thank you :) – Appenstien Official Aug 21 '14 at 11:38