Results 1 to 5 of 5

Thread: Text-indent problem with multiple <div> in IE6

  1. #1
    Join Date
    Jul 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Text-indent problem with multiple <div> in IE6

    Hi,

    I'm creating a theme for my forum right now.
    To give some place to my icon, I use the text-indent attributes.

    Here is the CSS :

    Code:
    .thead {
    	background: url(images/lp3e/bg_cat.gif) bottom left repeat-x;
    	text-indent: 26px;
    }
    
    .cat_icon {
    	background: url(images/lp3e/cat_icon.gif) 4px 50% no-repeat;
    	padding: 5px 0 7px 0;
    }
    
    .expcolimage {
    	float: right;
    	width: auto;
    	vertical-align: middle;
    	margin-top: 3px;
    }
    
    .smalltext {
    	font-size: 11px;
    }
    Here is the HTML :
    HTML Code:
    <div class="thead">
    	<div class="cat_icon">
    		<div class="expcolimage">
    			<img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" />
    		</div>
    		<strong>
    			<a href="{$forum_url}">{$forum['name']}</a>
    		</strong>
    		<br />
    		<div class="smalltext">
    			{$forum['description']}
    		</div>
    	</div>
    </div>
    It works well in FF, IE7 & IE8:


    But not in IE6:


    The weird thing is that the text-indent works in IE6 normally, I have it somewhere else inside just one <div> and it works. It's probably my divisions that are wrong.

  2. #2
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Default

    i think if u make the image display:block giving a little bit of right-margin.. with float:left... there will be no requirement of extra div.

  3. #3
    Join Date
    Jul 2009
    Location
    Coquitlam BC Canada
    Posts
    46
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    try using
    Code:
    left:'the width of the image +2 ';
    on the text.

  4. The Following User Says Thank You to fg123 For This Useful Post:

    Theberge43 (08-07-2009)

  5. #4
    Join Date
    Jul 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by fg123 View Post
    try using
    Code:
    left:'the width of the image +2 ';
    on the text.
    Thanks, that's perfect.

  6. #5
    Join Date
    Jul 2009
    Location
    Coquitlam BC Canada
    Posts
    46
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Smile

    Quote Originally Posted by Theberge43 View Post
    Thanks, that's perfect.
    UR welcome!

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
  •