Oct 27, 2004 #1 dwcasey MIS Joined Oct 31, 2002 Messages 179 Location US I would like to put an image in the lower corner of this css 'box' i've made. Is this something I put in the html file as part of the div class statement or should it go in the .css file where the div is defined?
I would like to put an image in the lower corner of this css 'box' i've made. Is this something I put in the html file as part of the div class statement or should it go in the .css file where the div is defined?
Oct 27, 2004 #2 Foamcow Programmer Joined Nov 14, 2002 Messages 6,092 Location GB it can go in either but the way you do it depends on the situation. the simplest way is to set the image as a background for your box and fix it to the bottom right. Code: #myBox { background:url(path/to/myImage.jpg) bottom right no-repeat; } This may not be suitable though if, for instance you want the user to interact with the image (i.e. make it a hyperlink) http://www.foamcow.com - Web design and ranting http://www.toccoagames.com - Day of Defeat gaming community "I'm making time Upvote 0 Downvote
it can go in either but the way you do it depends on the situation. the simplest way is to set the image as a background for your box and fix it to the bottom right. Code: #myBox { background:url(path/to/myImage.jpg) bottom right no-repeat; } This may not be suitable though if, for instance you want the user to interact with the image (i.e. make it a hyperlink) http://www.foamcow.com - Web design and ranting http://www.toccoagames.com - Day of Defeat gaming community "I'm making time
Oct 27, 2004 Thread starter #3 dwcasey MIS Joined Oct 31, 2002 Messages 179 Location US Something like this: <div class="oneThird" style="background-color: rgb(250,240,230) background:url(path/to/myImage.jpg) bottom right no-repeat;"> I already had the color in there, forgot to mention that. Upvote 0 Downvote
Something like this: <div class="oneThird" style="background-color: rgb(250,240,230) background:url(path/to/myImage.jpg) bottom right no-repeat;"> I already had the color in there, forgot to mention that.
Oct 27, 2004 #4 Foamcow Programmer Joined Nov 14, 2002 Messages 6,092 Location GB Code: <div class="oneThird" style="background:url(path/to/myImage.jpg) bottom right no-repeat rgb(250,240,230);"> That should work too. You can specify the color in the same style definition. try it and see if it works. http://www.foamcow.com - Web design and ranting http://www.toccoagames.com - Day of Defeat gaming community "I'm making time Upvote 0 Downvote
Code: <div class="oneThird" style="background:url(path/to/myImage.jpg) bottom right no-repeat rgb(250,240,230);"> That should work too. You can specify the color in the same style definition. try it and see if it works. http://www.foamcow.com - Web design and ranting http://www.toccoagames.com - Day of Defeat gaming community "I'm making time