473,503 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

* within CSS

In the following example what does starting this selector with * do? I
cant seem to find any reference to it. I took it off a popular website
and am trying to deficer it, thanks.

* html #someID form {
margin: 0 0 0 0;
padding: 0 0 0 0;
}

Jan 3 '06 #1
4 1133
mm*****@gmail.com wrote:
In the following example what does starting this selector with * do?


* matches "any element", so it means "descends from any element"

* html is a common hack to present some CSS to only Internet Explorer.

Since <html> is the root element, it can't descend from anything, but IE
doesn't realise this.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jan 3 '06 #2
On 03/01/2006 19:09, mm*****@gmail.com wrote:
In the following example what does starting this selector with * do?
[snip]
* html #someID form {
For some reason, IE is under the impression that the HTML element is not
the document root, and there is some element above it. As other browsers
don't suffer the same misconception, this rule would only be applied by IE.
margin: 0 0 0 0;
padding: 0 0 0 0;


These could be shortened to have a singular zero (0) value (in case you
weren't aware).

Mike
When posting code listings, please refrain from using tabs. Convert them
to spaces (preferably 2 to 4) first.

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jan 3 '06 #3
I have since found it in the W3C documentation. I probably wouldnt have
found it without your help. thanks!

5.3 Universal selector
The universal selector, written "*", matches the name of any element
type. It
matches any single element in the document tree. [p. 35]
If the universal selector is not the only component of a simple
selector [p. 67] , the
"*" may be omitted. For example:
*[lang=fr] and [lang=fr] are equivalent.
*.warning and .warning are equivalent.
*#myid and #myid are equivalent.

Jan 3 '06 #4
"* html" is commonly known as the Holly Hack, and you can find more
info on Holly and John's website:

http://www.positioniseverything.net/.../star-html.php

Jan 4 '06 #5

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

Similar topics

7
2296
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
2
7851
by: Craig | last post by:
I'm trying to do this within a control I've created: Cursor.Current = Cursors.WaitCursor; During the initialization of the parent form, my control gets added to the form, and while the control...
2
2317
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of...
9
2093
by: 47computers | last post by:
Pretty new to PHP, I recently started learning about error trapping. As of right now, I include the following into a page in my website: -------BEGIN PASTE-------- error_reporting(E_ERROR |...
3
3390
by: matko | last post by:
This is a long one, so I'll summarize: 1. What are your opinions on raising an exception within the constructor of a (custom) exception? 2. How do -you- validate arguments in your own...
1
1512
by: Birky | last post by:
I am truly stuck and need some help on how to put this form together; any help or suggestions you can provide would be greatly appreciated. (Sorry this one is so long but I believe it is necessary to...
5
2781
by: =?Utf-8?B?VmFubmk=?= | last post by:
Hi, I have a component where I need to have thread-safe access to a list. Operations on the list are done in critical sections (lock (lockObject) { ... } ) in the usual way, to make sure that no...
4
6018
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase...
5
2339
by: herenbdy | last post by:
I've been working on a Java based game in order to learn Java, but the game is functional only within my IDE (Eclipse). This image shows the file structure of my project:...
4
2463
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
7093
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...
0
7287
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
7468
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
5596
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,...
1
5023
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
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...

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.