I've got a few questions about some CSS formatting for web pages.
First, when specifying the alignment of an image, how do you get it so that nothing else appears on the same line as the image? Specifically, I'm aligning an image to the right as a header image, but things always like to encroach to the left of the image if there's space -- the only solution I can come up with is putting in a bunch of BR tags, but that solution is hardly elegant. I've also tried specifying "clear=all" directly in the IMG tag, and enclosing the image in a set of DIV tags. Neither of those solutions works either.
Second, is it OK to nest DIVs and SPANs in order to apply two classes to some elements? If so, which tag has precedence when they both specify a different value for the same attribute?
Third, is there any way to prevent a set of elements from wrapping? I have a few different images on one line, and I don't want them to wrap if there's not enough space -- I just want a scrollbar to appear (or perhaps they just are cut off). I know I can do this via a table, but is there a better way to do it?
Lastly, I have two images that I want to use as headers, but I want one aligned left and one aligned right (on the same line), and have them overlap in the middle if there's not enough space. Is there any way to do that?
Thanks.
First, when specifying the alignment of an image, how do you get it so that nothing else appears on the same line as the image? Specifically, I'm aligning an image to the right as a header image, but things always like to encroach to the left of the image if there's space -- the only solution I can come up with is putting in a bunch of BR tags, but that solution is hardly elegant. I've also tried specifying "clear=all" directly in the IMG tag, and enclosing the image in a set of DIV tags. Neither of those solutions works either.
Second, is it OK to nest DIVs and SPANs in order to apply two classes to some elements? If so, which tag has precedence when they both specify a different value for the same attribute?
Third, is there any way to prevent a set of elements from wrapping? I have a few different images on one line, and I don't want them to wrap if there's not enough space -- I just want a scrollbar to appear (or perhaps they just are cut off). I know I can do this via a table, but is there a better way to do it?
Lastly, I have two images that I want to use as headers, but I want one aligned left and one aligned right (on the same line), and have them overlap in the middle if there's not enough space. Is there any way to do that?
Thanks.