Jerry Johnson wrote:
> I have been beating my head against this for a few hours.
>
> I have some existing code I need to style properly. I cannot (at this
> time) change the html elements, just need to get them working right.
>
> Trying to add an icon image to the end of a string. In ff and safari,
> no problem. In IE without the anchor, no problem. In IE, the image is
> treated as a block (line break before and after, putting the image on
> its own line)
>
> <h1><span>TITLE</span>&nbsp;<span><img></span></h1>
>
> <h1><a><span>TITLE</span>&nbsp;<span><img></span></a></h1>
>
> Any suggestions (other than rewriting the html) to make the img stay
> on the same line?
>
> I made the image display:inline, and tried a thousand variations of
> float and display and every other style. And it works sometimes (about
> 1 refresh out of 6 shows it inline as desired. The rest do not

Hi Jerry,

The float wont work since the image comes AFTER the rest of the heading, 
so that's out. Display: inline on the image wont work because the 
heading is a block level element and it sounds like the anchor is also, 
causing it to drop to a new line. However, you could try making the 
entire h1 element inline and see if that works, or you could make sure 
the anchor is also display:inline, since you mention IE works without 
this. Alternatively, with the code as it stands, you may try adding 
position:relative to the h1, and position:absolute;top:0;right;0 to the 
icon. That should work.

If you have a link we could take a look at, that would definitely be 
helpful and I can assure you someone on this list will get it working.

Oh, and Tony I haven't forgotten, I'm looking at your site now so more 
to come!

adieu
Mark


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:297153
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to