|
Posted by El Kabong on 08/23/07 02:30
"dorayme" <doraymeRidThis@optusnet.com.au> wrote in message
news:doraymeRidThis-4F2D6C.18120421082007@news-vip.optusnet.com.au...
>I will be soon making up a page with a table of items. There will
> be a fair few rows. All not high, all tabular.
>
> People will be referencing parts of it via links that latch onto
> ids that will be placed on the <tr>s. But while this will narrow
> things down for folk, they will still see a whole lot of other
> stuff depending on the vertical size of their browser window. I
> was rather hoping there might be a neat way of also highlighting
> the row concerned, not necessarily literally the row, but
> something to mark it out as the one to be attended to. Need no
> help with the actual css, more with how to let the browser or
> server know which row needs the style.
>
> Can't think of any normal html/css way of doing this. Not
> particularly keen on a js way ...though I might consider it as it
> is sort of an extra bit of help and not fundamentally bad if
> anyone has it turned off.
>
> Anyone know of a php way perhaps? Do I have to go to alt.php. or
> alt.js.
>
> Can't I please just stay here? I like it here in spite of my bad
> treatment.
>
> I am reminded of that php stuff that I have used to stick in an
> id="current" on some list items depending on the html file being
> accessed. Perhaps it will all be clear by morning. But if anyone
> knows the way to go without blinding me with science... please,
> do spill the beans. <g>
>
I've never done it but according to "CSS Cookbook" by Christopher Schmitt,
(available at Amazon for $29.69 USD,) you can "use the target pseudo-class
to define the look of the elements when the user clicks on the anchored
link."
(Hope he doesn't mind me quoting him.)
Here's how I think it would work in your example:
..sku th,td:target {
background-color: #FFFF00;
color: #00000
font-weight: 800;
}
And then you would include class="sku" in appropriate cell elements... I
think... maybe.
If it works for you I may try it myself.
El
[Back to original message]
|