I got a div that contain a Prgraph and inside it there's some text nd a part of it is in Italic. The problem is that as soon s I add the <i> tag it breakes down the div it's in and spred all over. The code:
.theText {
margin-top: -2px;
float: right;
}
.theText P {
direction: ltr;
text-align: justify;
}
<div class="theText">
<p>
<i>How are you?</i> Said the hammer.
</p>
</div>
What can it be?
Thanks!Hmm... could you post a link to an example?
Right off the bat, I'd say to use <em> for emphasis instead of the i-tag, and be sure there's a doctype on that (I'm assuming it's a fragment.) Also, the direction: rule isn't really necessary is it? That may confusing whatever browser the problem occurs in.
Just try removing things one at a time to isolate the problem...This is my doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
What is the different between <i> and <em>?
I took the direction: rule out.
The results:
Only a few sentances looks good, the rest not. I'm not sure why?
It seems like that the only ones that looks OK is all of those that contain one owrd or two. The rest of'em, that contain more words (20) breaking the lines.
What can it be?Originally posted by weee
This is my doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
What is the different between <i> and <em>?
I took the direction: rule out.
The results:
Only a few sentances looks good, the rest not. I'm not sure why?
It seems like that the only ones that looks OK is all of those that contain one owrd or two. The rest of'em, that contain more words (20) breaking the lines.
What can it be?
<i> is not included in the html 4.01 strict doctype. You will want to use <em> or <strong> instead. The difference is that those two tags actually have semantic value. They relay a meaning to the text. Using css you can make any tag do anything really. You should be able to code the entire site using just the <div> tag. The reason you dont is because it holds no meaning when being viewed. When the search bots see your site they can only see what you tell it. The <H#> tag tells it that its a header. and this is why there are certain tags that should be used for certain things tcI ran the page inside the HTML validator and I had no errors (I'm using <i>). Should I switch to <em> any way?Originally posted by weee
I ran the page inside the HTML validator and I had no errors (I'm using <i>). Should I switch to <em> any way?
Yea, switch to <em> as for the reason I stated (it holding actual meaning). <i> is basically being forgotten i guess, and the other stuff is what is being accepted and read. it's still doens't work. Well, I learned something new anyway.Originally posted by weee
it's still doens't work. Well, I learned something new anyway.
didn't think it would fix it unfortunately could you maybe provide a link to the site you are doing it in (with <em> in there, so i can see what exactly it is doing) and maybe i can see something else. thxA link will definitely help, but also check out this page: <!-- m --><a class="postlink" href="http://www.positioniseverything.net/explorer/italicbug-ie.html">http://www.positioniseverything.net/exp ... ug-ie.html</a><!-- m -->
Internet Explorer has some issues with italisized text, not the <I> or <EM> tags.Thanks guys!
.theText {
margin-top: -2px;
float: right;
}
.theText P {
direction: ltr;
text-align: justify;
}
<div class="theText">
<p>
<i>How are you?</i> Said the hammer.
</p>
</div>
What can it be?
Thanks!Hmm... could you post a link to an example?
Right off the bat, I'd say to use <em> for emphasis instead of the i-tag, and be sure there's a doctype on that (I'm assuming it's a fragment.) Also, the direction: rule isn't really necessary is it? That may confusing whatever browser the problem occurs in.
Just try removing things one at a time to isolate the problem...This is my doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
What is the different between <i> and <em>?
I took the direction: rule out.
The results:
Only a few sentances looks good, the rest not. I'm not sure why?
It seems like that the only ones that looks OK is all of those that contain one owrd or two. The rest of'em, that contain more words (20) breaking the lines.
What can it be?Originally posted by weee
This is my doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
What is the different between <i> and <em>?
I took the direction: rule out.
The results:
Only a few sentances looks good, the rest not. I'm not sure why?
It seems like that the only ones that looks OK is all of those that contain one owrd or two. The rest of'em, that contain more words (20) breaking the lines.
What can it be?
<i> is not included in the html 4.01 strict doctype. You will want to use <em> or <strong> instead. The difference is that those two tags actually have semantic value. They relay a meaning to the text. Using css you can make any tag do anything really. You should be able to code the entire site using just the <div> tag. The reason you dont is because it holds no meaning when being viewed. When the search bots see your site they can only see what you tell it. The <H#> tag tells it that its a header. and this is why there are certain tags that should be used for certain things tcI ran the page inside the HTML validator and I had no errors (I'm using <i>). Should I switch to <em> any way?Originally posted by weee
I ran the page inside the HTML validator and I had no errors (I'm using <i>). Should I switch to <em> any way?
Yea, switch to <em> as for the reason I stated (it holding actual meaning). <i> is basically being forgotten i guess, and the other stuff is what is being accepted and read. it's still doens't work. Well, I learned something new anyway.Originally posted by weee
it's still doens't work. Well, I learned something new anyway.
didn't think it would fix it unfortunately could you maybe provide a link to the site you are doing it in (with <em> in there, so i can see what exactly it is doing) and maybe i can see something else. thxA link will definitely help, but also check out this page: <!-- m --><a class="postlink" href="http://www.positioniseverything.net/explorer/italicbug-ie.html">http://www.positioniseverything.net/exp ... ug-ie.html</a><!-- m -->
Internet Explorer has some issues with italisized text, not the <I> or <EM> tags.Thanks guys!