View Full Version : How to make something float on a page?
k12onos
07-03-2008, 04:52 AM
hi guys, today i want to ask again, let say i have a website and the front page is index.htm
now i have some image and i want to make it float on the index.htm on the left side, how can i do this?
thank you before guys :)
allahverdi
07-03-2008, 05:08 AM
Give style:
<img style="float:left" src="images/img1.jpg" title="myimage" />
Or give class:
CSS
<style>
.myimage{
float:left;
}
</style>
HTML
<img src="myimage.jpg" title="myimage" class="myimage"/>
k12onos
07-03-2008, 05:15 AM
sorry but i tried and it didnt work, what i mean by float is when we scroll down the page the image follows to scroll down,its called floating right? sorry if i got the wrong name for it,,
but thanks before for the answer :)
allahverdi
07-03-2008, 05:27 AM
Sorry, i thought css float ><
you mean you want the element to always stay in the same place in the browser window? Use css (for example, this div will always stay in the top left corner of the screen):
<div style="position: fixed; top: 0px; left: 0px">
</div>
k12onos
07-06-2008, 01:24 PM
what if i want to make it at the bottom of the page? i mean everyone's screen is in different size, so how do i make it always in bottom?
jscheuer1
07-06-2008, 01:46 PM
<div style="position: fixed; bottom: 10px; left: 0px">
</div>
k12onos
07-06-2008, 01:55 PM
wow thanks a lot jscheuer1 !
will try it right away :)
thanks again!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.