SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: IMG tag & CSS

  1. #1
    SitePoint Enthusiast webgirl's Avatar
    Join Date
    Jun 2002
    Location
    Florida
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IMG tag & CSS

    I'm playing with image placement. I like the outcome in FF but IE is giving me fits. Is this just not possible or is there an IE hack that will correct this? Code is listed below the images.

    Reasoning for attempting to insert the image this way is to get around the save image as right click option. And yes, I know if someone wants the image badly enough there are many other ways to obtain it. For my target audience though....this is workable. Oh and honestly, I just wanted to see if it would work.

    The image is the green box with flower.

    Here's what I get with FF.


    And here is the same in IE. Note the image icon...



    CSS:
    Code:
    .grnimg {
    	float: left;
    	margin-right: 10px;
    	margin-bottom: 0px;
    	background-image: url(grnimg.gif);
    	background-repeat: no-repeat;
    	width: 200px;
    	height: 161px;
    }
    HTML:
    Code:
    <div>
        <img class="grnimg">
        <p>text text text text text text text text text text text text text </p>
    <div>

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Location
    Nebraska
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of using img, change it to a div ( or just about any other tag) . That'll remove the image icon from ie.

  3. #3
    SitePoint Enthusiast webgirl's Avatar
    Join Date
    Jun 2002
    Location
    Florida
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh I did initally try this by changing to a div tag which did not work. A simple <p did the trick. Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •