Hello.
I have a single DIV tag which I have named, and I'd like to apply a block of text & an image inside that DIV.
I've used CSS to position the image to the RIGHT of the DIV, and the text is to be at the LEFT. Both elements basically to sit side by side of each other.
I'm having trouble though understanding the concept of clearing floats etc... Do I need to wrap a DIV around the image so that I can apply padding to the image, or can I just use CSS to apply the image as a background to the DIV, and then apply padding to it?
Here's my CSS....
#jrcontent {
height: 225px;
position: relative;
top: 14px;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
background-image: url(images_jpg/JR.jpg);
background-repeat: no-repeat;
background-position: right top;
width: 580px;
}
Or should I use a pseudo selector like so.....?
#jrcontent, #img {
position: blah blah;
margin: 5px;
float: right;
float: clear-right;
}
If someome could give me an idea of what the CSS could be, I'd be really gratefull!!!!
Thanks all!!
}
Oh, I forgot to mention....
I do actually want the image within the HTML source so that I can apply 'alt' and 'title' tags to it.
I have a single DIV tag which I have named, and I'd like to apply a block of text & an image inside that DIV.
I've used CSS to position the image to the RIGHT of the DIV, and the text is to be at the LEFT. Both elements basically to sit side by side of each other.
I'm having trouble though understanding the concept of clearing floats etc... Do I need to wrap a DIV around the image so that I can apply padding to the image, or can I just use CSS to apply the image as a background to the DIV, and then apply padding to it?
Here's my CSS....
#jrcontent {
height: 225px;
position: relative;
top: 14px;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
background-image: url(images_jpg/JR.jpg);
background-repeat: no-repeat;
background-position: right top;
width: 580px;
}
Or should I use a pseudo selector like so.....?
#jrcontent, #img {
position: blah blah;
margin: 5px;
float: right;
float: clear-right;
}
If someome could give me an idea of what the CSS could be, I'd be really gratefull!!!!
Thanks all!!
}
Oh, I forgot to mention....
I do actually want the image within the HTML source so that I can apply 'alt' and 'title' tags to it.