![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to style an icon "hanging" below the first line of a heading and I've found interesting difference between Mozilla and the other browsers I'm trying with - Safari 3.1.1, Opera 9.27 and IE 6: http://www.geocities.com/stanio/test/hanging-icon.html I've used negative 'text-indent' and with Mozilla the first line of text doesn't flow over the "hanging" icon, while with the other browsers I see what I want to achieve. Which is correct in this case - what I see with Mozilla or with the other browsers? Could I achieve the same effect another way? |
#3
| |||
| |||
|
|
On 2008-06-07, Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: http://www.geocities.com/stanio/test/hanging-icon.html I've used negative 'text-indent' and with Mozilla the first line of text doesn't flow over the "hanging" icon, while with the other browsers I see what I want to achieve. Which is correct in this case - what I see with Mozilla or with the other browsers? Could I achieve the same effect another way? Take the floated <img> out of the <h2> and put it before it instead and you should get the same effect in all the browsers. You'll need to change "h2 .icon" just to .icon. |
|
I say "still" valid, it's not valid at the moment, so you will need to fix a few other things first. Test it at http://validator.w3.org. |
#4
| |||
| |||
|
|
It looks like a bug in Firefox. It seems to be having problems applying text-indent when there's a float before the first bit of text. |
#5
| |||
| |||
|
|
Sat, 07 Jun 2008 11:35:57 -0500, /Ben C/: On 2008-06-07, Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: http://www.geocities.com/stanio/test/hanging-icon.html I've used negative 'text-indent' and with Mozilla the first line of text doesn't flow over the "hanging" icon, while with the other browsers I see what I want to achieve. Which is correct in this case - what I see with Mozilla or with the other browsers? Could I achieve the same effect another way? Take the floated <img> out of the <h2> and put it before it instead and you should get the same effect in all the browsers. You'll need to change "h2 .icon" just to .icon. I see. The problem is I didn't want to take the icon out of the heading and the link it constitutes, i.e. I don't want to have two links where the icon one is generally empty (has no text content). |
#6
| |||
| |||
|
|
My partial solution: http://www.geocities.com/stanio/test/hanging-icon-2.html h2><a href="#"><img alt="" src="icon1.png" class="icon" span>Lorem Ipsum Dolor Sit Amet Consectetuer Adipiscing Elit</span></a></h2 I enclose the link text in a SPAN which I style as block and give text-indent to it. The drawback of it is the link active area is extended to the whole block width and not just the text. |
![]() |
| Thread Tools | |
| Display Modes | |
| |