473,394 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Different behavior of tag SPAN under IE and FF

db
Hello @ all,

I got a problem regarding tag SPAN. Under IE, all text within tag SPAN
will be centralized, whereas under FF the text stays on the left.

The correponding HTML code is
<span class="c_normal">Some text here.......</span>

the style class c_normal is defined as:
..c_normal {
clear: left;
text-align: justify;
line-height: 150%;
font-size: 11pt;
font-family: Arial;
margin:0px;
}

Furthermore, there is an another weird problem:
When i changed the style.css file, the page which uses the style.css
does not change at all under IE, whereas the page under firefox will
change correspondingly.
For example: if i change e.g font-size to 50pt, the page under firefox
will change correspondingly, but the page under IE keeps the same after
refresh. I dont know why this happens.

Can somebody help me? Thanks!

db

Nov 28 '06 #1
6 1686
VK

db wrote:
Hello @ all,

I got a problem regarding tag SPAN. Under IE, all text within tag SPAN
will be centralized, whereas under FF the text stays on the left.

The correponding HTML code is
<span class="c_normal">Some text here.......</span>

the style class c_normal is defined as:
.c_normal {
clear: left;
text-align: justify;
line-height: 150%;
font-size: 11pt;
font-family: Arial;
margin:0px;
}

Furthermore, there is an another weird problem:
<snip>

Ask at <comp.infosystems.www.authoring.stylesheets: and be ready for
questions (of different degree of nastiness) why are you using span as
block element. As an elementary precaution :-) I would change it to div
first, see if the problems persist and then go to the indicated
newsgroup.

--
"Give to Caesar what is Caesar's, and to God what is God's."

Nov 28 '06 #2
ASM
db a écrit :
Hello @ all,

I got a problem regarding tag SPAN. Under IE, all text within tag SPAN
will be centralized, whereas under FF the text stays on the left.
How can you have text centered while you ask to have it justified ?
text-align: justify;
means fill up the line (when it's possible)

By otherway the tag span gan't get a width, so text can't be centered in it.
If you want a span centered in a line (a P or a DIV) it is this
container which has to be styled in center (see also below).

About IE, possible it doesn't refresh external styles sheet.
Ask to him to open this *.css to force it to refresh
then open your page (don't go back)
<span class="c_normal">Some text here.......</span>

the style class c_normal is defined as:
.c_normal {
clear: left;
text-align: justify;
line-height: 150%;
font-size: 11pt;
font-family: Arial;
margin:0px;
to center this element --margin: auto;
}


--
Stephane Moriaux et son moins vieux Mac déjà dépassé
Stephane Moriaux and his less old Mac already out of date
Nov 29 '06 #3
db

VK schrieb:
Ask at <comp.infosystems.www.authoring.stylesheets: and be ready for
questions (of different degree of nastiness) why are you using span as
block element. As an elementary precaution :-) I would change it to div
first, see if the problems persist and then go to the indicated
newsgroup.

Thanks for reply. I have tried <divor <pbefore i posted the thread.
It did work. But the problem is i use a plugin(Tinymce) to generate the
online word-like editor, the plugin just uses <spantag, i cannot
change the source code.

With using <spantag the FF keeps the text left, which is what i want,
but IE keeps the text centered. I would like to know how to let the
text in IE stay left like in FF, instead of centered without touching
the source code.

db

Dec 4 '06 #4
db

ASM schrieb:
How can you have text centered while you ask to have it justified ?
text-align: justify;
means fill up the line (when it's possible)

By otherway the tag span gan't get a width, so text can't be centered in it.
If you want a span centered in a line (a P or a DIV) it is this
container which has to be styled in center (see also below).

About IE, possible it doesn't refresh external styles sheet.
Ask to him to open this *.css to force it to refresh
then open your page (don't go back)
to center this element --margin: auto;
Hi, thank you for the reply.

I also tried with text-align:left. It doesnt work neighther. T_T
With using span, the text in IE is centered, in FF not. Actually i want
the text to stay in left, not centered.

I tried with your second advice, it doesnt work also......

thanks anyway

db

Dec 4 '06 #5
ASM
db a écrit :
I also tried with text-align:left. It doesnt work neighther. T_T
With using span, the text in IE is centered, in FF not. Actually i want
the text to stay in left, not centered.

I tried with your second advice, it doesnt work also......
Once more : 'span' is of style "inline" so you can separate it fron its
context, that's to say its container "P".
If P is aligned to right, spam follows movement

The only thing I think you can do is to modify this span in block

..c_normal {
clear: left;
display: block;
margin:0px;
/* to center the span
width: 200px;
margin: auto;
*/
text-align: left;
font-size: 11pt;
line-height: 150%;
font-family: Arial;
border:1px solid red;
}
<p style="text-align: right">some text to fill ...
<span class="c_normal">Some text here.......</span>
rest of filling text.
</p>

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
ASM = Aimable Stéphane Moriaux = Amateur Sasseur Merdouilles
Dec 4 '06 #6
db

ASM schrieb:
db a écrit :
I also tried with text-align:left. It doesnt work neighther. T_T
With using span, the text in IE is centered, in FF not. Actually i want
the text to stay in left, not centered.

I tried with your second advice, it doesnt work also......

Once more : 'span' is of style "inline" so you can separate it fron its
context, that's to say its container "P".
If P is aligned to right, spam follows movement

The only thing I think you can do is to modify this span in block

.c_normal {
clear: left;
display: block;
margin:0px;
/* to center the span
width: 200px;
margin: auto;
*/
text-align: left;
font-size: 11pt;
line-height: 150%;
font-family: Arial;
border:1px solid red;
}
ASM = Aimable Stéphane Moriaux = Amateur Sasseur Merdouilles
Thanks a lot!

display: block; does the magic!

And for my second question: why IE does not take the stylesheet, i have
also found the reason. One has to delete all buffer data for IE,
otherwise IE will alway use the first stylesheet it downloaded.....
Thats stupid -.-!!

db

Dec 4 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CJM | last post by:
I have an ASP page that lists files and folders in a directory. I'm using a cookie to record the last time this page was visited, and I intend to show links that are created/modified from that date...
13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
5
by: aamirghanchi | last post by:
Hi, I have a very simple html that has a linked stylesheet. According to the style sheet both blocks of text should be displayed in the font xx-small. but only one (DIV or SPAN) at a time is...
6
by: J.A.Rank | last post by:
Hello all. I wrote a client-side form evaluation script that runs as expected in Firefox, Netscape, and IE for PC, but fails in IE for Mac. The formEval() method is called from the onSubmit...
1
by: Christopher P. Winter | last post by:
I'm seeing some unexpected behavior with Text-indent, as shown on this page: http://www.chris-winter.com/Digressions/HP_Kayak/My_Kayak.html I set up the following style rules for footnotes: ...
3
by: madforplaid | last post by:
Can anyone help me to figure out a strange span/radio button/JavaScript behavior? When clicking on the radio button for WEEK 2 below all works okay, but when clicking on the label for the same...
0
by: Curtis Koppang | last post by:
I have a CSS style with a behavior specified in a CSS class. I set the CssStyle of a radio button to the name of the CSS class. ASP.NET radio buttons render as a span wrapping all the input tags...
1
by: KPS | last post by:
I'm attempting to create a simple treeview-like behavior in JavaScript. The desired behavior happens in IE but I cannot get the same to happen in FireFox. The primary thing I want to accomplish...
1
by: richardsayre | last post by:
I am making a spell checker. The reqest sends out the text and gets back HTML of the suggestions and misspelled words. When you click on a misspelled word the suggestion list pops up and you can...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.