HighDots Forums  

Re: IE: Indentation breaks relative link

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: IE: Indentation breaks relative link in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Els
 
Posts: n/a

Default Re: IE: Indentation breaks relative link - 07-21-2004 , 07:15 PM






Aarono Brown wrote:

Quote:
In the following html page, I'm using a stylesheet to move
everything in the body over five percent, and then move the
h1 heading back over to the left margin. On IE 6 (W2K & 98)
the relative link (fragment identifier) only works if the
heading text is wider than five percent of the window size.

Is this a known bug? Is there a workaround?
It works correctly in Firefox, but not in IE6 on WinXP.
I think it has to do with the negative margin. Not entirely
sure though.

Workaround could be this:

<style type="text/css">
body {
margin-left:0;
text-indent:5%;
}
h1{
text-indent: 0%;
}
</style>

But:
Quote:
h1><a id="linky">l</a></h1
Why don't you just write
<h1 id="linky">l</h1>
?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Kirsty MacColl - A New England


Reply With Quote
  #2  
Old   
Aarono Brown
 
Posts: n/a

Default Re: IE: Indentation breaks relative link - 07-22-2004 , 09:35 AM






Els wrote:

Quote:
It works correctly in Firefox, but not in IE6 on WinXP.
Yeah, I didn't mention it in the original post, but I tried
it successfully on Firefox as well.

Quote:
Why don't you just write
h1 id="linky">l</h1
?
Good question -- I'm automatically generating the html where
I originally encountered the problem, and it uses the same
function to generate hyperlinks wherever they are. When I
edited it down to the sample code that I posted, it never
occured to me to get rid of the anchor tag.

Quote:
Workaround could be this:

style type="text/css"
body {
margin-left:0;
text-indent:5%;
}
h1{
text-indent: 0%;
}
/style
This works, but when I apply it to the real page, I can't
get the tables (real tabular data) to indent correctly
(neither in IE nor in Firefox). (Also, the fact that,
unlike margins, indentation applies only to the first line
of a block isn't appropriate for what I'm doing.)

However, you put me on the right track. Instead of using
margin-left to skooch the whole body to the right and then
using it again on the headings I wanted on the left, I tried
just using margin-left just on the list of all tags that I
want skooched (and letting everything else default to the
left side):

p,h3,table { margin-left: 5%; }

The page is now, as far as I can tell, working perfectly in
both IE and Firefox.

Thanks a lot for the help,

--
Aaron Brown
arundelo @ hotmail.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.