View Full Version : placing images inside a DIV

03-20-2012, 09:04 PM
Hi guys

I know there is numerous posts on images and I have looked through many of them however I still cannot get my head round positioning an image inside a DIV tag.

I have laid out my page with the various div tags and in the logo div which is above the naviagation bar I have placed my logo image to the left not with any skill just by using the enter bar and aligning it left. However I now want to add 3 icons for twitter,facebook and tripadvisor over to the right in a row with the address of restaurant above ....

I allready have an external style sheet for the page including the logo div, so how do i go about positioning these images inside of the div itself, people have said css but i do not know how to apply it to the images themselves

any help would be appreciated folks i have a capture of the page and can put code up if that helps

03-21-2012, 01:04 AM
you could use css for a specific div and assign it a class

.divimage img{

then float left ,add any margins etc that you want

03-21-2012, 05:12 PM
What so place another div inside this div and assign it a class ....do i then save this as an internal css file ie this doucment only so it does not affect the rest of the site

03-22-2012, 01:14 AM
no , perhaps i didnt expalinn ewell. I meant you can assign that to the class you use , theres no need to add another div. alternatively you can create a class and apply it to any image as in <img class="yourclass" src="......

03-22-2012, 02:34 PM
Oh right cool I will give that a whirl thanks