Jump to content
Sign in to follow this  
khalen

Inline Issue Cant Resolve

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.

Share this post


Link to post
Share on other sites

Please post your code and / or a link would be better still.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...