473,606 Members | 2,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linked stylesheet strange behavior

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 displayed in this
font and that would be the one that is at the end of the stylesheet
file. for example if DIV selector is the last block in MyStylesheet.cs s
then the corresponding text in the DIV tag in the html will be small
font. If we swap the spaces of div and span in the styleshet then the
corresponding tag in the span tag in the html will be small
_______________ _______________ _______________ ___
MyStylesheet.cs s
/*************** */
<style>

span {
font-size : xx-small;
}
div {
font-size : xx-small;
}
</style>

_______________ _______________ _______________ ____
Test.htm
<!------------->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="stylesheet " type="text/css" href="HighResol ution.css" />

<title>test.htm </title>

</head>

<body>

<div>this text is in DIV</div>
<span>this text is in SPAN</span>
</body>
</html>

Jul 21 '05 #1
5 2275
In comp.infosystem s.www.authoring.stylesheets, aa**********@ya hoo.com
wrote:
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 displayed in this
font and that would be the one that is at the end of the stylesheet
file. for example if DIV selector is the last block in MyStylesheet.cs s
then the corresponding text in the DIV tag in the html will be small
font. If we swap the spaces of div and span in the styleshet then the
corresponding tag in the span tag in the html will be small
_______________ _______________ _______________ ___
MyStylesheet.cs s
/*************** */
<style>
The above <style> and the </style> must be removed from your
stylesheet. The validator would have told you this.
span {
font-size : xx-small;
}
div {
font-size : xx-small;
}
Consider using percentages instead of keywords for sizing. Some
browsers do not recognize them. For example:
span.small { font-size: 80%; }
</style>

_______________ _______________ _______________ ____
Test.htm
<!------------->
You don't want the above line in your HTML.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="stylesheet " type="text/css" href="HighResol ution.css" />

<title>test.htm </title>

</head>

<body>

<div>this text is in DIV</div>
<span>this text is in SPAN</span>
A <span> is an inline element, should not be a child of <body> but
should be within a <div> or a <p> or other block-level element.
</body>
</html>


Post a URL to your problem page.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #2
aa**********@ya hoo.com wrote:

div {
font-size : xx-small;

<link rel="stylesheet " type="text/css" href="HighResol ution.css" />


I find it rather ironic that you are using such a teensy font-size for a
"high resolution" stylesheet. I take it you don't want your visitors to
be able to read it, eh? ;)

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #3
Hi Beauregard,
...The validator would have told you this. the problem was indeed the <style> tags in the css file. Sorry no
validator ...I am using notepad.
... Some browsers do not recognize them This web app is targetted for an intranet app and our staff use only
one browser type.
...You don't want the above line in your HTML I created this example on the fly. It is a very simple example of a
complex page.
... <span> is an inline element, should not be a child of <body ...

Thanks for shaing this. Is it in w3c specs

Thanks for your help.

Aamir

Jul 21 '05 #4
Thanks for correction. Should have been LowResolution.c ss

Jul 21 '05 #5
In c.i.w.a.s, aa**********@ya hoo.com wrote:
Hi Beauregard,


Good morning.
...The validator would have told you this.


the problem was indeed the <style> tags in the css file. Sorry no
validator ...I am using notepad.


http://www.htmlhelp.com/tools/csscheck/ Copy your file into the
proper text box. Your choice of editor doesn't matter.
... [size words] Some browsers do not recognize them


This web app is targetted for an intranet app and our staff use
only one browser type.


Still ... it pays to use good habits all the time. Oh, in future, be
sure to state if your question is not for www.
...You don't want the above line in your HTML


I created this example on the fly. It is a very simple example of a
complex page.


This is why it is always a good idea to post your problem page on a
server somewhere, so we can see a working example, with some sort of
content.

<sniprest>
--
-bts
-This space intentionally left blank.
Jul 21 '05 #6

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

Similar topics

2
3442
by: Marcus | last post by:
Hello, I recently converted all my existing MyISAM tables to InnoDB tables through phpmyadmin. I noticed some strange behavior whenever I would refresh the screen, as phpmyadmin would report different numbers for the cardinality of the primary key (i.e. one minute it would say cardinality 388, then 244 on refresh, then something else), and it would report different values for the number of rows when mousing over the table names on the...
4
3297
by: Catherine Lynn Smith | last post by:
OK, I am learning my way around the new DOM, but I am still at a loss on finding a few things. I have an HTML document that links to a stylesheet. /* START STYLESHEET EXAMPLE */ /* styles/mystyles.css */ ..leftnav { font-family: Arial, Helvetica, sans-serif; font-size: 13pt;
1
1320
by: Mei | last post by:
Hi, I'm running ASP under IIS 6 with Tomcat. During the process, Tomcat will forward to an ASP page with some data and those data will be written to MS SQL and display some information in that particular ASP page. The Servlet has no unsafe code. The strange thing is that all the data is written correctly in the MS SQL with correct user and related information but the data might become blank or send to different users in that ASP page....
11
1661
by: Marlene Stebbins | last post by:
Something very strange is going on here. I don't know if it's a C problem or an implementation problem. The program reads data from a file and loads it into two arrays. When xy, x, y, *xlist and *ylist are ints or floats there is no apparent problem. If these variables are doubles, the program crashes. Furthermore, the crashes occur only when xlist and ylist are free()ed. When the above variables are doubles and the calls to free() are...
18
1607
by: genc ymeri | last post by:
Hi, I just noticed that while trying to run this code : MessageBox.Show("Hello"); the message box pops up but shows no string/message in it. (expecting the "Hello" string). Even the "OK" string in the button itself in dialog box doesn't show. I tried to write "Hello" string in the caption/text of the button or the
2
1213
by: Maileen | last post by:
Hi, I have some strange behavior in my application. Let's say I have 2 buttons and 1 Textbox. 1. when i click on button1, it writes "hello world" in my textbox. i see it. 2. after that, i click on button2 to take the text of my textbox and do something with it. but instead of that, button2 returns me an empty
1
1504
by: Alexander Inochkin | last post by:
Hi! I found same strange behavior of ASP.NET. It is possible this is the bug. Follow the steps:
0
3566
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage requests database, and query execution time exceeds 30 seconds, the following error reported: ===
10
2329
by: John Kraft | last post by:
Hello all, I'm experiencing some, imo, strange behavior with the StreamReader object I am using in the code below. Summary is that I am downloading a file from a website and saving it to disk for further parsing. I know, I could use the WebClient and it would be easier, but I don't have the flexibility I want with it. This code appears to work exactly the way I want unless the user cancels the the background operation. In that...
0
8045
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8467
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, 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...
0
8462
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 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...
0
8320
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 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...
1
5994
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3952
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2458
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
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.