chocolatxbliss 0 Report post Posted December 28, 2005 HELLO does anyone know how you can like...position an image wherever you want? I'd prefer not to put it into its own "div" box.................. is there a code or something for it? Share this post Link to post Share on other sites
Houdini 0 Report post Posted December 29, 2005 You can use CSS to position an image like say a logo. you would first define the CSS like this with CSS<style type ="text/css"> <!-- img.logo {position:fixed; top:0px; right:0px} --></style>The above would go before the </head> of your page then you would place the style you just defined for the image tage with a class of logo like the below<img class="logo" src="where the image is">The above will set your logo image at the top right of your page and it would stay there even if the user scrolls down, I am sure you have seen this before.All you need to do now is go and learn about CSS or DHTML, just do a gGoogle search for positioning images or CSS positioning. Share this post Link to post Share on other sites
evion 0 Report post Posted December 29, 2005 Following houdini's little help i would also like to add that you could use absolute positioning too if you don't like CSS all that much (no offence =P). For example: <img src="[B]url of image here[/B]" style="position:absolute; left:[B]0[/B]px; top:[B]0[/B]px"> Where the bolded zeros are you would place the number of pixels from the page margins you want an image to be. For instance, if you had put in top:100px then the image will be a 100 pixels below the top margin and vice versa for the left margin. You could also substitute the left margin for the right margin if you want. You also have to remember to set the margins for the page in order for this code to work right in Firefox or other Mozilla/Netscape browsers. EX: In the body tag, add LEFTMARGIN="0" TOPMARGIN="0" within it. The numbers are of course changeable to whatever margins you wish the page to start with. Share this post Link to post Share on other sites
Houdini 0 Report post Posted December 29, 2005 Actually the code given above is CSS but it is inline with the tag instead of defining a class as I did you still are defining the CSS within the element itself so he would still be using CSS (That is what style is A Cascading Style Sheet) and it must be referenced. You can use absolute , relative, fixed or static positioning. So he would still need to learn a little about CSS and how to use it for whatever his particular application. It is not that hard really, and DHTML is the Combination of CSS, JavaScript and HTML to achieve dynamic results that are just not possible with any of the above alone. A great site is Dynamic Drive with all knids of free code and hints as well as samples. Share this post Link to post Share on other sites