PDA

View Full Version : a content box at the top of my page doesn't want to fit the image.


drag0nhe4rt
01-23-2012, 01:26 PM
hello,

my website i am building at the moment has 2 content boxes currently. both boxes have a height set to "auto" to my understanding even with an image inside these content boxes the height should adjust to them? this isnt happening with my website. i have tried; absolute, relative and floating the image. however none of them seem to work.

this is my site:
janedealsart.co.uk (http://janedealsart.co.uk)

css can be found here:
http://janedealsart.co.uk/css/style.css

you will have to view the source code from the browser.

any help this problem would be most appreciated.

thanks,
drag0nhe4rt.

drag0nhe4rt
01-23-2012, 01:36 PM
please note that this is only a practice site.
hence the random writing in the content boxes.

drag0nhe4rt
01-23-2012, 02:32 PM
okay, ive managed to get the image into the content box
http://janedealsart.co.uk/images/crop2.png

however it wont position left.
Example:

http://janedealsart.co.uk/images/crop.png

Ricky55
01-23-2012, 06:30 PM
you need to float the image.


/*img or more specific selector*/
img {
float: left;
}

drag0nhe4rt
01-23-2012, 09:44 PM
thank you ricky- i managed to get it to work however floating turned out to be only half the answer. i had to do this:

#picturebox1 {
float:left;
margin:5px;
}

drag0nhe4rt
01-23-2012, 09:46 PM
margin of course was dependant on the image used

**correction**

margin-right:5px;