pardon the coversational manner of my thread subject.
i'm having issues with the way that the two browsers handle CSS.
this is an element i've defined in my style sheet.
===========
sm {
font: 10px arial;
color: #53278F;
}
===========
in mozilla, i can insert this tag anywhere i want, and the browser
renders it fine. (ie. <sm>this is text</sm>)
IE ignores the tag completely.
if i create an element that looks like this...
===========
..small {
font: 10px arial;
color: #53278F;
}
===========
.... and then use it as a "div class," IE mostly gets it right.
(ie. <div class="small">t his is text</div>
am i doing something "wrong?"
is one of these methods "more correct" than the other?
i'm at the point where i want to scrap CSS altogether and go back to
defining fonts inline. at least then i had a pretty good idea of how
they would render.
(i won't even go into the "tableless" nonsense.) 27 2297 di*@butter.toas t.net wrote: this is an element i've defined in my style sheet. =========== sm { font: 10px arial; color: #53278F; } =========== in mozilla, i can insert this tag anywhere i want, and the browser renders it fine. (ie. <sm>this is text</sm>)
IE ignores the tag completely.
You must prepend a dot (".") to the class name: ".sm". IE only
implements a subset of CSS and parts of that are poorly done.
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email) di*@butter.toas t.net wrote: pardon the coversational manner of my thread subject. i'm having issues with the way that the two browsers handle CSS.
this is an element i've defined in my style sheet.
sm { font: 10px arial; color: #53278F; }
There is no such tag as 'sm' in HTML, so AFAIK you can't set CSS
properties for it. Mozilla accepts it, but I don't know why.
if i create an element that looks like this...
.small { font: 10px arial; color: #53278F; }
... and then use it as a "div class," IE mostly gets it right. (ie. <div class="small">t his is text</div>
Instead of using:
font: 10px arial;
I would suggest that you use:
font-size:10px; font-family:Arial, sans-serif;
since I seem to remember that some older browsers don't handle the first
as well.
You say "IE mostly gets it right": please be more specific; give an
example with a URL. di*@butter.toas t.net wrote: this is an element i've defined in my style sheet.
sm { font: 10px arial; color: #53278F; }
in mozilla, i can insert this tag anywhere i want, and the browser renders it fine. (ie. <sm>this is text</sm>)
Is this an HTML or an XML document?
You can't just invent HTML elements at your whim.
And why invent a <sm> element when the <small> element already exists,
isn't deprecated and could easily be given the above styles by your
style sheet?
IE ignores the tag completely.
if i create an element that looks like this...
.small { font: 10px arial; color: #53278F; }
... and then use it as a "div class," IE mostly gets it right. (ie. <div class="small">t his is text</div>
How does IE only get it "mostly" right? What does IE get wrong?
am i doing something "wrong?"
Using px for font sizes.
Setting a specific font-family without setting a generic family.
Setting a colour without setting a background colour.
Using a class name that refers to what the class looks like rather
than what it is.
is one of these methods "more correct" than the other?
The second method is "less incorrect".
i'm at the point where i want to scrap CSS altogether and go back to defining fonts inline. at least then i had a pretty good idea of how they would render. (i won't even go into the "tableless" nonsense.)
Okay, we won't go into helping you.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
these might be a dumb questions:
if i prepend a dot to anything, do i have to use <div class="sm"></div>
in the HTML?
should i make sure all of my style elements are .something, and always
use div? di*@butter.toas t.net wrote: if i prepend a dot to anything, do i have to use <div class="sm"></div> in the HTML?
..foo is the CSS selector for any element with class="foo" in the HTML.
..foo matches <div class="foo">... </div> and <p class="foo">... </p> and
<strong class="foo">... </strong>
p.foo only matches <p class="foo">... </p>
should i make sure all of my style elements are .something, and always use div?
No. Use the most appropriate HTML element for the content you are
marking up. Then add CSS on top of that as needed.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
In article <11************ **********@f14g 2000cwb.googleg roups.com>, di*@butter.toas t.net enlightened us with... should i make sure all of my style elements are .something, and always use div?
Or a span. Or a paragraph. Or whatever you want. A .something can apply to
any element as long as what you have in there applies to the element you're
using it on.
..bordered { border: 1px solid navy; }
<p class="bordered ">yada yada</p>
<table class="bordered "> ...</table>
Or if you almost always want an element to look some way, say all your
emphasized elements should be black and bold unless you specify otherwise, do
em {
color: black;
font-weight: bold;
}
em.purple {
color: purple;
font-weight: bold;
}
<em>this is normal emphasized text</em>
<em class="purple"> this is purple emphasized text</em>
Note that you can do this because the EM element already exists, unlike your
SM example.
--
--
~kaeli~
He had a photographic memory that was never developed. http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace
>Is this an HTML or an XML document? You can't just invent HTML elements at your whim.
it's HTML.
and apparently i can, so long as i'm only viewing the page with
Mozilla.
And why invent a <sm> element when the <small> element already exists, isn't deprecated and could easily be given the above styles by your style sheet?
it was just an example...
and yes, you're right.
How does IE only get it "mostly" right? What does IE get wrong?
well, in continuing to develop my apparently very incorrect style
sheet, i tried to create superscript.
sup {
font:10px arial;
color: #53278F;
vertical-align: 20%;
}
IE appears to ignore the vertical align element.
i'm sorry if i'm asking the question the wrong way, or if my lack of
knowledge is somehow offensive. i hope that in asking stupid
questions, someday i might be as cool as you. di*@butter.toas t.net wrote: Is this an HTML or an XML document? You can't just invent HTML elements at your whim. it's HTML.
No, it's not.
and apparently i can, so long as i'm only viewing the page with Mozilla.
Apparently, Mozilla is mis-interpreting it as xml/xhtml or something
else. It is not html.
well, in continuing to develop my apparently very incorrect style sheet, i tried to create superscript.
sup { font:10px arial; color: #53278F; vertical-align: 20%; }
sup { font:70% arial, sans-serif; color: #53278F; vertical-align: 20%;}
...seems to work for me in Firefox and IE6. (Don't use px/pt for font
sizes, and specify a generic fallback.) I have good luck using
line-height: 0; instead of a vertical-align.
IE appears to ignore the vertical align element.
Which version?
i'm sorry if i'm asking the question the wrong way,
There is a knack to it...
or if my lack of knowledge is somehow offensive. i hope that in asking stupid questions, someday i might be as cool as you.
Um, statements like that don't help.
--
-bts
-This space intentionally left blank. di*@butter.toas t.net wrote: well, in continuing to develop my apparently very incorrect style sheet, i tried to create superscript.
sup { font:10px arial; color: #53278F; vertical-align: 20%; }
If you had any problems using google to look up why px for font size,
font family with no generic family, and colour with no background
colour are problems then you can always ask here (the middle one is
actually debatable but the first and last are sound advice).
Now, do you want your superscripts to be a different colour and font
to the surrounding text? Normally you don't so you wouldn't set those
properties. Just font-size and vertical-align and/or line-height.
IE appears to ignore the vertical align element.
Seems to work here. The baseline of the superscript is roughly 20%
above the baseline of the rest of the text (IOW somewhat lower than
the unstyled baseline for superscripts) in IE5.01, IE6, Firefox 1.0
and Opera 8b3.
i'm sorry if i'm asking the question the wrong way, or if my lack of knowledge is somehow offensive. i hope that in asking stupid questions, someday i might be as cool as you.
It's eleven o'clock on a bank holiday Monday and I'm at home posting
to Usenet. If you think I'm cool then your life must really suck.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net > <http://steve.pugh.net/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jonny T |
last post by:
hi,
i want to echo the string '<?php' in a php script like :
echo "<?php";
but when i try nothing gets displayed ...
if I use
echo "<\?php";
|
by: haoren |
last post by:
Can anybody help me with this problem:
How can I echo a string that contain <? and <?php?
For example,
$str="test <? and <?php echo";
echo $str;
|
by: winderjj |
last post by:
Hi All,
I need everyones opinion. I am very new to XML but am temporarily
putting all my efforts into using it. This is what I need to do.
Write an xml parser (in C) that will parse a fairly complicated XML
file that is full of technical data(most scalar values). Then I need
to store all the info in a C structure. Could some people give me
their opinion. Which is better suited for this, Expat or LT xml?
|
by: matatu |
last post by:
Hi to all,
I have a xml file, a substring like:
<a href="#">text</a>
which after an xslt trasform is rendered as (using xsl:output method html):
<a href="#">text</a>
|
by: higabe |
last post by:
Three questions
1)
I have a string function that works perfectly but according to W3C.org
web site is syntactically flawed because it contains the characters </
in sequence. So how am I supposed to write this function?
String.replace(/</g,'<');
| |
by: tobbe |
last post by:
Hi
Im trying to load a XmlDataDocument with the following xml:
<ROOT>
<NAME> < & > " '</NAME>
</ROOT>
And i know I have a entity problem here, but i cant find any solution for
it. The problem is that i recive this from external source and cant
|
by: Jon Noring |
last post by:
Out of curiosity, may a CDATA section appear within an attribute
value with datatype CDATA? And if so, how about other attribute
value datatypes which accept the XML markup characters?
To me, the XML specification seems a little ambiguous on this, so
I defer to the XML authorities. Refer to sections 2.4 and 2.7 (it all
hinges on if CDATA attribute values are part of markup or not.)
Thanks.
|
by: Armel Asselin |
last post by:
Hello,
I've been using XML for a while in a rather 'free' manner (i.e. as long as
IE accept it it's OK), I read recently (again) the Xml standard 1.0 (3rd
edition) and found this sentence:
Well-formedness constraint: No < in Attribute Values
The replacement text of any entity referred to directly or indirectly in an
attribute value MUST NOT contain a <.
|
by: spibou |
last post by:
I saw it at http://www.faqs.org/rfcs/rfc1305.html
Is it not the same as writing ``if (m)'' ?
|
by: webmasterATflymagnetic.com |
last post by:
Folks,
I'm struggling to put the question together, but I have this problem.
I have written an HTML form that I can use for data entry. This uses
PHP to write a SQL UPDATE command that gets written to my MySQL
database. I can later view this data back in the form.
One thing I've noticed happening is if I enter code such as < it
gets rewritten as < (ie the less-than sign). Now I don't want this to
happen, but something somewhere is...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |