473,395 Members | 1,702 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,395 software developers and data experts.

css direct style ok, indirect no work

i wont used three styles in the element of a list;
i have does so:

<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class:"mystile">..... </p> </li> 3° style
...
</ul>
the call to class
not function, no work

<ul>
<li> ............................. </li> first style
<li> <p> ..........................</p> </li>
<li> <p style="background:blue>..... </p> </li>
...
</ul>

insert direct
this ok

Why?
How i can resolve ?

thank you

Jul 20 '05 #1
13 2784
arreeess <no**@yyyy.yy> wrote:
i wont used three styles in the element of a list;
i have does so:

<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class:"mystile">..... </p> </li> 3° style
class="mystile"
...
</ul>
the call to class
not function, no work


Naturally.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2


<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class:"mystile">..... </p> </li> 3° style

class="mystile"

...
</ul>
the call to class
not function, no work

Naturally.


excuse me, my error of text send
really is:
<li> <p class="mystile">..... </p> </li> 3° style

not function, why?
Jul 20 '05 #3


arreeess wrote:
i wont used three styles in the element of a list;
i have does so:

<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class:"mystile">..... </p> </li> 3° style
...
</ul>

excuse me, my error of text send
really is:
<li> <p class="mystile">..... </p> </li> 3° style

so, the call to class
not function, no work

<ul>
<li> ............................. </li> first style
<li> <p> ..........................</p> </li>
<li> <p style="background:blue>..... </p> </li>
...
</ul>

insert direct
this work, this is ok

Why?
How i can resolve ?

thank you


Jul 20 '05 #4
arreeess <no**@yyyy.yy> wrote:
excuse me, my error of text send


You have been excused. Now, if you wish to get help with your problem,
you will post the URL of your problem page, instead of (mis)copying
arbitrary snippets of code. I did not start searching all of .yy domain
to find your page, especially since .yy does not exist _yet_ (there was a
hint here).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #5
You have been excused. Now, if you wish to get help with your problem,
you will post the URL of your problem page, instead of (mis)copying
arbitrary snippets of code. I did not start searching all of .yy domain
to find your page, especially since .yy does not exist _yet_ (there was a
hint here).


oh (excuse still) i am a newbie, i haven't page online, i try only in local.
can you help me however.
the code is simple:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx

<html>
<head>

<title> Doc </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
@import url(style_marg_padd.css);
@import url(style_color_list.css);
@import url(style_color_p.css);
</style>
</head>
<body class="marg_padd_0">
<div id="navcontainer003">
<ul id="navlist003">
<li><a href="#"> 001 </a></li>
<li><a href="#"> 002 </a></li>
<li><a href="#"> 003 </a></li>
<li><p style="background:Black"> 004 </p></li>
<li ><p class="color_element_p"> 005 </p></li>
<li><a href="#"> 006 </a></li>
<li><p> 007 </p></li>
<li><a href="#"> 008 </a></li>
</ul>
</div>
</body>
</html>

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx
style="background:Black" function
class="color_element_p" no function
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
STYLESHEETS:

first stylesheet

---style_marg_padd.css---
..marg_padd_0 {margin:0px; padding:0px;}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx

2nd stylesheet
---style_color_list.css---

#navcontainer003
{width:10%;}
#navcontainer003 ul li p
{
display: block;
background-color: silver;
color:red;
margin:0;
padding: 5px 5px 5px 20px; /*distanzio la scritta dentro il blocco a*/
border-bottom: 1px solid #eee;
}

#navcontainer003 a
{
display: block;
padding: 5px 5px 5px 20px; /*distanzio la scritta dentro il blocco a*/
background-color: #8B4513;
border-bottom: 1px solid #eee;
}

#navcontainer003 a:link, #navlist003 a:visited
{
color: aqua;
text-decoration: none;
}

#navcontainer003 a:hover
{
background-color: #0000CD;
color: #fff;
}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
third stylesheet

---style_color_p.css----
..color_element_p {background:Black;}


Jul 20 '05 #6
arreeess <no**@yyyy.yy> wrote:
oh (excuse still) i am a newbie, i haven't page online, i try only in
local.


You are not excused. Please keep using a forged From line until you have
a clue.

(If you cannot upload a document onto a Web server, why are you asking in
a www group? Just a rhetoric question.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #7
What browser are you using? @import doesn't work in Netscape 4.x.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #8
in style_color_list.css you define:
#navcontainer003 ul li p
{
display: block;
background-color: silver;
color:red;
margin:0;
padding: 5px 5px 5px 20px; /*distanzio la scritta dentro il blocco a*/
border-bottom: 1px solid #eee;
}

Then in style_color_p.css you re-define the background color as such:
.color_element_p {background:Black;}


The reason its not coloring it is due to the rules of cascading. Your first
Definition of the background color has more weight because you have one ID.
Thus to fix it you need to change the style code in style_color_p.css to be:

#navcontainer003 .color_element_p {background:Black;}
Once you do that, the problem will be fixed.

Sincerely,
The Master
arreeess <no**@yyyy.yy> wrote in message news:<Y_***********************@news4.tin.it>...
You have been excused. Now, if you wish to get help with your problem,
you will post the URL of your problem page, instead of (mis)copying
arbitrary snippets of code. I did not start searching all of .yy domain
to find your page, especially since .yy does not exist _yet_ (there was a
hint here).


oh (excuse still) i am a newbie, i haven't page online, i try only in local.
can you help me however.
the code is simple:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx

<html>
<head>

<title> Doc </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
@import url(style_marg_padd.css);
@import url(style_color_list.css);
@import url(style_color_p.css);
</style>
</head>
<body class="marg_padd_0">
<div id="navcontainer003">
<ul id="navlist003">
<li><a href="#"> 001 </a></li>
<li><a href="#"> 002 </a></li>
<li><a href="#"> 003 </a></li>
<li><p style="background:Black"> 004 </p></li>
<li ><p class="color_element_p"> 005 </p></li>
<li><a href="#"> 006 </a></li>
<li><p> 007 </p></li>
<li><a href="#"> 008 </a></li>
</ul>
</div>
</body>
</html>

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx
style="background:Black" function
class="color_element_p" no function
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
STYLESHEETS:

first stylesheet

---style_marg_padd.css---
.marg_padd_0 {margin:0px; padding:0px;}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx

2nd stylesheet
---style_color_list.css---

#navcontainer003
{width:10%;}
#navcontainer003 ul li p
{
display: block;
background-color: silver;
color:red;
margin:0;
padding: 5px 5px 5px 20px; /*distanzio la scritta dentro il blocco a*/
border-bottom: 1px solid #eee;
}

#navcontainer003 a
{
display: block;
padding: 5px 5px 5px 20px; /*distanzio la scritta dentro il blocco a*/
background-color: #8B4513;
border-bottom: 1px solid #eee;
}

#navcontainer003 a:link, #navlist003 a:visited
{
color: aqua;
text-decoration: none;
}

#navcontainer003 a:hover
{
background-color: #0000CD;
color: #fff;
}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
third stylesheet

---style_color_p.css----
.color_element_p {background:Black;}

Jul 20 '05 #9
> The reason its not coloring it is due to the rules of cascading. Your first
Definition of the background color has more weight because you have one ID.
Thus to fix it you need to change the style code in style_color_p.css to be:

#navcontainer003 .color_element_p {background:Black;}
Once you do that, the problem will be fixed.

Sincerely,
The Master


ok thank you

so I can to have more style for the element in the list

<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class:"mystile_01">..... </p> </li> 3° style
<li> <p class:"mystile_02">..... </p> </li> 4° style
<li> <p class:"mystile_03">..... </p> </li> 5° style
...
</ul>
another solution can to be:

<ul>
<li > .................................. </li> first style
<li class:"mystile_01" > ............... </li> 2° style
<li class:"mystile_02" > ............... </li> 3° style
<li class:"mystile_03" > ............... </li> 4° style
...
</ul>
that you think, it is good solution?
and is preferable to use class or ID within tag li ?

have you other solution for to apply more styles to elements in the list ?
Jul 20 '05 #10
On Sun, 13 Jun 2004 09:47:05 GMT, arreeess <no**@yyyy.yy> wrote:
so I can to have more style for the element in the list [...] <li><p class:"mystile_01">..... </p></li> 3° style


Sigh; get a clue will you?

<p class:"mystile_01">..... </p>
<p class="mystile-01">..... </p>
--------^--------^

Element attribute value assignment is indicated by a '=' character.

NEVER! use underscores '_' in class attribute values, if you want to
use those values as _reliable_ CSS selectors. Replace with a dash '-'.

--
Rex

Jul 20 '05 #11
ok thank you

so I can to have more style for the element in the list

<ul>
<li> ............................. </li> first style
<li> <p> .....................</p> </li> 2° style
<li> <p class="mystile_01">..... </p> </li> 3° style
<li> <p class="mystile_02">..... </p> </li> 4° style
<li> <p class="mystile_03">..... </p> </li> 5° style
...
</ul>
another solution can to be:

<ul>
<li > .................................. </li> first style
<li class="mystile_01" > ............... </li> 2° style
<li class="mystile_02" > ............... </li> 3° style
<li class="mystile_03" > ............... </li> 4° style
...
</ul>
that you think, it is good solution?
and is preferable to use class or ID within tag li ?

have you other solution for to apply more styles to elements in the list ?
Jul 20 '05 #12
Sigh; get a clue will you?

<p class:"mystile_01">..... </p>
<p class="mystile-01">..... </p>
--------^--------^

Element attribute value assignment is indicated by a '=' character.

NEVER! use underscores '_' in class attribute values, if you want to
use those values as _reliable_ CSS selectors. Replace with a dash '-'.

ok
there is a list of others similar rule?

but with IE6 and NEtscape7 it work:
is it only one coincidence ?

thank you

Jul 20 '05 #13
On Sun, 13 Jun 2004 16:05:53 GMT, arreeess <no**@yyyy.yy> wrote:
Element attribute value assignment is indicated by a '=' character.

NEVER! use underscores '_' in class attribute values, if you want to
use those values as _reliable_ CSS selectors. Replace with a dash '-'.
ok
there is a list of others similar rule?
Yes; such "lists" are called "specifications"...

For HTML ...
http://www.w3.org/TR/html4/

For CSS1 ...
http://www.w3.org/TR/CSS1

For CSS2 ...
http://www.w3.org/TR/CSS2/

The CSS2 "errata" ...
http://www.w3.org/Style/css2-updates...12-errata.html

For CSS2.1 ...
http://www.w3.org/TR/CSS21/

You do tour own homework on those.
but with IE6 and NEtscape7 it work:
is it only one coincidence ?


The '=' character has always been the defined character for to indicate
an attribute value assignment in markup, no exceptions that I know of.

A browser that conforms to CSS1 will ignore any class attribute selector
(and it's 'property:value' specification) if the selector name contains
an underscore '_' character.

A browser that conforms to CSS2 will ignore any class attribute selector
(and it's 'property:value' specification) if the selector name contains
an underscore '_' character.

A browser that conforms to CSS2, plus its questionable "errata"
document, will accept a class attribute selector (and it's
'property:value' specification) if the selector name contains an
underscore '_' character.

A browser that conforms to CSS2.1 will accept a class attribute selector
(and it's 'property:value' specification) if the selector name contains
an underscore '_' character.

Now it's up to you to decide which level of browsers you want to exclude
from rendering your documents as per your style suggestions.

--
Rex

Jul 20 '05 #14

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

Similar topics

17
by: Anthony Roberts | last post by:
If I end indentation levels with "pass" statements, will I piss off people that have to read my code? eg: for i in xrange(0,5): if i: print i pass print i * -1 pass
18
by: Exits Funnel | last post by:
Hello, I'm a little confused about where I should include header files and was wondering whether there was some convention. Imagine I've written a class foo and put the definition in foo.h and...
1
by: suresh | last post by:
Namasivayah, Stroustrup says when indirect array is used for reordering a valarray the index cannot be repeated twice(page 679). But Nicolai Josuttis in his book on C++ standard library, page...
1
by: Sam Phillips | last post by:
Howdy, I'm trying to apply color schemes to forms and subforms. I'm using a global function to change the colors/fonts of controls. Right now it correctly loops over the controls in the main...
13
by: ganeshb | last post by:
Hi, What C statement(s) would translate to indirect jmp in assembly? I know that function pointer invocation would translate to indirect 'call' instruction, but I am not sure what will lead to...
3
by: li_zy | last post by:
Hello , everyone ! It is appreciated that someone tell me what's the difference between direct SYSADM authority and indirect SYSADM authority . I am running a DB2 v8.1 fix9 on a linux server...
1
by: aminpashas | last post by:
Hey All; I needed to know how could I make an indirect link to cd-rom in my XML file? I need to write something that orders the computer to check the cd-rom drive letter and automatically link me...
92
by: lovecreatesbea... | last post by:
i = i++; The gcc gives out a warning on this line of code, saying "warning: operation on `i' may be undefined". But I think, at the end of the execution of the statement, the variable i is...
5
by: Rahul B | last post by:
Hi, I am having the following issues while trying to restrict the current user from creating any objects. Below is the privileges for the user and response when i try to create a table in that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.