Gossamer Forum
Home : Products : DBMan : Customization :

CSS and Date Questions

Quote Reply
CSS and Date Questions
Is it possible to add a cascading style sheet to the '[>>]' thing, appears when you want to go to the next page. I have the fonts of it working but need a CSS to make it change colors when your mouse goes over it. I think this is the code for it below.
if ($db_next_hits) { print "<br> <$font><$font_color><$face>pages: $db_next_hits</font>"; }

And I tried to sort by my 'date' field but it does not seem to work. Should it? I looked at older messages about getting it to work but didn't understand it, is there an easy way to do this.

Thank You,
Shane
Quote Reply
Re: CSS and Date Questions In reply to
Someone else will have to answer about CSS. I don't know anything about it.

Regarding sorting by your date field, have you got the data type for the field set to "date"?

------------------
JPD





Quote Reply
Re: CSS and Date Questions In reply to
I don't know what I did wrong but sorting by date works now, thanks.

Question:
I want to have a radio selection that will sort by either Name(3) or by Date(1). Only problem is that I need the names to be sorted in ascending order and the Date by (newest) descending order. Any clue on how to do this?

<input type="radio" name="sb" value="1">
<input type="radio" name="sb" value="3">

Shane

Quote Reply
Re: CSS and Date Questions In reply to
Since the default is sort order is "ascend" you only have to worry about when it's the date field that's being sorted on. You can add a line to sub query in db.cgi.

After

local (%sortby);

add

Code:
if ($in{'sb'} == 1) {
$in{'so'} = 'descend';
}




------------------
JPD





Quote Reply
Re: CSS and Date Questions In reply to
Shane1800,

I believe I might be able to answer your CSS problem.

What you can try is this. In the html.pl (or whatever you have renamed it to) file, go to the view_sucess section. Place the following code inside the <HEAD> potrion of that 'page':

Code:
<style><!--a{text-decoration:none;}--></style>
<style><!--a:hover{color:#804000; text-decoration:underline;}--></style>

This is a couple lines I am using on my DBMan Help Page. I have it set so that all links are not initially underlined, but when the mouse moves over the link, it becomes underlined and the color changes. You can try different variations to is such as adding "font-weight:bold;" inside the second line to make the link turn bold when the mouse is over it, and so on.

I hope this is what you were reffering to.

Andrew
Quote Reply
Re: CSS and Date Questions In reply to
Things work great, thanks for the help!

Shane