A CMS, over which I have no control, auto-generates a number
of the following blocks (with different values for the
hrefs, background-images, and the textual content of
the innermost A element) :
div class=album_box
a
Since In CSS an element cannot be selected based on its children, I
think the only way this can be achieved is by using javascript.
On Thu, Dec 2, 2010 at 3:30 PM, Philip Taylor (Webmaster, Ret'd)
p.tay...@rhul.ac.uk wrote:
A CMS, over which I have no control, auto-generates a number
of the
Looks like absolute urls are blocked. Try this:
div.album_box
a[href$=gallery/sandbox-3228] ,
div.album_box
a[href$=gallery/sandbox-3228] +
div.album_title ,
div.album_box
a[href$=gallery/sandbox-3228] +
div.album_description ,
div.album_box
a[href$=gallery/sandbox-3228] +
div.clear_both
{
There were some mistakes in the selectors, my fault for not testing them first!
Anyway, this will work:
div.album_box a[href$=gallery/sandbox-3228] ,
div.album_box a[href$=gallery/sandbox-3228] + div.album_title ,
div.album_box a[href$=gallery/sandbox-3228] + div.album_title +
To target div.album_box when it is the first child element of its parent:
div.album_box:first-child
{
visibility:hidden;
}
For this to work the markup should be something like this:
div class=parent
div class=album_boxthis is the first-child of parent, it will
be hidden/div
div
visibility:hidden makes an element invisible, but the element still
occupies space. To make an element completely disappear from the flow,
use display:none
~C
On Thu, Dec 2, 2010 at 4:57 PM, Philip Taylor (Webmaster, Ret'd)
p.tay...@rhul.ac.uk wrote:
Excellent, now there Chetan : _Sandbox is
The following removes the gap.
.album_box
{
height:auto;
max-height:150px;
}
IE6 does not support max-height so use a conditional comment to
specify an IE6-only stylesheet that restores the original height
declaration in IE6.
~C
On Thu, Dec 2, 2010 at 5:04 PM, Chetan Crasta