
Originally Posted by
shoshanaz
Is there a way to put text with an html floated image
into a div defined in css?
Because the site is meant to be dynamic, I won't know what images might be included, nor their size.
CSS can't be used to put various image sizes into an HTML page. Well, I guess technically you could but you're going to get funky results. You need to design your CSS around how big your images will be. The only problem I see with the code below (b/c I'm intermediate with CSS) is you have not declared a float value below, like so:
Your code:
Code:
#pagemain {
float: none;
border: 1px solid #003399;
position: relative;
background-color: #FFFFFF;
Float value declared:
Code:
#pagemain {
float: left or right, adjust to suit;
border: 1px solid #003399;
position: relative;
background-color: #FFFFFF;
}
Without the above declared, you are not telling the browser which way to float the text surrounding it.
Bookmarks