Question: Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.

I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.

Also, if this is possible, I would prefer it to be a Linux based OS and Webkit based browser.

Answer: 
For this task, I would recommend you use a powerful extension of CSS called [LESS](http://lesscss.org/). It compiles into CSS or can be used on-the-fly with a javascript file as the link explains.

LESS supports inheritance (almost) as you describe. The [documentation](http://lesscss.org/#docs) has the details (see the section "Mixins").

For your example, the LESS code would be:

```
.someBaseDiv {
    margin-top:3px;
    margin-left:auto;
    margin-right:auto;
    margin-bottom:0px;
}

someInheritedDiv {
    .someBaseDiv;

    background-image:url("images/worldsource/customBackground.gif");
    background-repeat:no-repeat;
    width:950px;
    height:572px;
}

```

Note that it would have to be `.someBaseDiv` and not `div.someBaseDiv`
If you want all the inner DIVs with a specific class to inherit from the base class build the HTML markup like this:

```
<div class="parent">
    <div class="child">X</div>
</div>

```

And the CSS

```
.parent { border: 2px solid red; color: white }
.parent .child { background: black }

```

If all DIVs must inherit change `.child` to `div`.

[**See this example on jsFiddle**](http://jsfiddle.net/Yeraq/)

The following code

```
// parent     // all DIVs inside the parent
.someClass    div { }

```

Means: A top element (any) with the class `someClass` will add the styles to all its children DIVs (recursively).