
Originally Posted by
Twey
I have two questions.
1) Is it possible to combine fixed and variable widths with CSS? I have a sidebar that makes (heavy) use of a background image.
The rest of the document certainly can be fluid, if that's what you're asking (I'm not entirely sure).
Using absolute positioning:
Code:
#content {
margin-left: x;
}
#sidebar {
left: 0;
position: absolute;
width: x;
}
HTML Code:
<div id="content">
<!-- ... -->
</div>
<div id="sidebar">
<!-- ... -->
</div>
Using floats:
Code:
#sidebar {
float: left;
width: x;
}
#content {
margin-left: x;
}
HTML Code:
<div id="sidebar">
<!-- ... -->
</div>
<div id="content">
<!-- ... -->
</div>
This needs to be the correct size (or have its background image stretched, preferably
As John said, an image that's amenable to tiling's better. Alternatively, one that fades or otherwise blends into the background.
2) Likewise, is it possible to override some properties applied to an element using a descendant selector with a class (applied later using ECMAScript)?
It depends what you're trying to override, or rather, how specific those definitions were. If the declarations were applied through an in-line style declaration or a selector containing an id attribute (specifically, #hash rather than [id=value]), then the only way to override those declarations using only a class selector is using the !important priority.
It's all about specificity.
I have images, and a layout, and I'm speculating on the implementation.
Visual aids are very useful. Even if they're only mouse-drawn doodles. 
Mike
Bookmarks