Jump to content

Inline Issue Cant Resolve


khalen

Recommended Posts

Hi allI am trying to do a simple text base page with a couple of small gif's in with the text.No matter what I try I cannot get the bloody gifs to display inline.I have tried display: inline; in the css file and tried <span></span> in the html but it always aligns to the left.I can get it there with absolute positioning but then get the usual cross browser issues with it appearing in different places depending on the browser and ver!Can anyone suggest a solution please.

Link to comment
Share on other sites

I cant post link because I haven't uploaded yet. I need to get it working before I upload.basically I have this in html<p> At the end of each topic you will find an information book icon, <img class="book" src="images/book.jpg" width="25" height="25" /> This icon points you to suggested reading in the DSA publication 'Driving the essential skills'.</p>and the css code associated with this .book{display: inline;}The image is displaying but not in between the text I need it too that is where I have placed it in the code.Thanks

Link to comment
Share on other sites

Images are inline elements by default. If your image is behaving as a block, it's because somewhere on your page you have declared an image as a block.

Link to comment
Share on other sites

Whew must have been a good year since I've come here..You probably target elements as such#content img{display;block;}Or some sort of float on it. Make sure you be as specific as you can when specifying display:inline; for .book otherwise it will get overridden. If you download Ffirebug, a tool for firefox, then it can tell you waht styles are on the image and you can see what is possibly overriding your .book declaration.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...