473,402 Members | 2,072 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,402 software developers and data experts.

CSS selector problem ... built in ASP

Hi

I have the following html structure

<div>
<ul>
<li>
<a href="...">I'm a level 1 link</a>
<ul>
<li>
<a href="...">I'm a level 2 link</a>
<li>
</ul>
</li>
</ul>
</div>

I want to have a web application that allows the end user to build up their
style sheet by selecting colours etc and seeing what affect this has on the
above html.

So, someone might want level 1 links to appear one way and level 2 links to
appear another.

How this happens is as follows:

They select a colour for each and these values get sent to the page
containing the above html as parameters within the request object.

The style sheet is then built up as follows (using ASP)

div ul li a
{
property: <% = Request("level1colour")%>;
}

div ul li ul li a
{
property: <% = Request("level2colour")%>;
}

This works perfectly (I'm writing the code from scratch in this post, so
there may be errors in what's written here).

However, if they do NOT provide a level two colour, then the level 2 links
inherit the level 1 properties.

Effectively, I believe that what this style sheet is saying is "any anchors
in a list item in an unordered list anywhere in a div will have a level1
colour, unless these are nested within a further list item & unordered list
in which case they will have the level2 colour".

I need to find a way of saying that the level 2 link will not inherit the
level 1 properties.

Any suggestions on how this can be done with CSS?

Thanks

Griff



Dec 22 '05 #1
0 1105

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

Similar topics

6
by: Richard Barnet | last post by:
Dear CSS gurus, My question regarding 'the cascade' is a simple one, but one that I haven't heard anyone talk about before: When cascading (for instance, when applying two linked stylesheets),...
4
by: Zane | last post by:
Hi, I am having some grieve with the following part of my CSS, basically when using a composite selector using an ID as the first element the it doesn't display the expected results. Am I doing...
3
by: Lian Liming | last post by:
Hi, The language in my web site may be Simplified Chinese or English. I want to define different styles for each language. For each language, the http header is different. <meta name="language"...
2
by: Chris Sharman | last post by:
See http://services.ccagroup.co.uk/testform.htm Looks as intended in firefox, is valid (bulk of inputs centred in a div occupying the left half of the page). ie ignores the child selector,...
8
by: sajid | last post by:
The CSS 2.1 Specification describes how to sort a list of selectors in order of specificity, but it doesn't provide a method to calculate the specificity of a single selector in isolation. I've...
3
by: JakDaniel | last post by:
is it possible, create a selector as alias of another selector... (maybe) in another stylesheet file? ex: html page .... <link rel="stylesheet" type="text/css" href="style1.css" /> <link...
6
by: _googlepost | last post by:
I have some CSS that goes something like this: table.TableStyle {font-family: "Helvetica", "Ariel"; background- color:white; border-collapse:collapse;} table.TableStyle COLGROUP { background-...
3
by: Rotsey | last post by:
I do not have a configuration selector on my vs screen Is this due to the fact that I selcted VB as language when I installed vs??? How do I bring up the configuration selector I cannot see...
2
by: Karl | last post by:
I trying to use the slider control in A2000. I don't see a mouse up event and the Updated event doesn't seem to fire after moving the slider. I did get lost focus to work if I click on another...
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: 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
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,...
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...
0
agi2029
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,...
0
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...

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.