Mouse over and clickable cells

This forum is now closed. Please ask all styles-related questions in the phpBB 3.0 Styles Support & Discussion Forum.
Locked
Volion
Registered User
Posts: 94
Joined: Sun Nov 09, 2003 5:25 pm
Contact:

Mouse over and clickable cells

Post by Volion »

Greetings,


How to make the cells in the categories highlight as you mouse over them, this was going to be my separation or formline between the categories.

Example: the box for the test forum highlights on mouse over as in the forum below.

http://www.sonicstranger.com/forum




Link is in the signature.


Edit: for reference material


Last edited by Volion on Tue Nov 11, 2003 11:21 pm, edited 4 times in total.
Image
Proud supporter of phpBB-RPG.com.

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: Work in progress 2

Post by Arty »

Volion wrote: So far I created a cellpic33 for the headers, though yes I don?t know why it does not continue across. Any suggestions on how to fix this?

Remove this from css: background-repeat: repeat-y;
Volion wrote: I have been digging through the forums to find out how to make the cells in the categories highlight as you mouse over them, this was going to be my separation or formline between the categories. Is this a mod?

Add this code to <td> that you want to highlight:

Code: Select all

onmouseover="this.style.backgroundColor='#F8F9FC';" onmouseout="this.style.backgroundColor='#EFF2F9';"
(change color to correct one)
and if you want to make it clickable add something like this:

Code: Select all

onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"
(change to url that you want box to redirect. this example is for index_body.tpl)
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Volion
Registered User
Posts: 94
Joined: Sun Nov 09, 2003 5:25 pm
Contact:

Post by Volion »

Edit: for referenced material

Copy of the original:

/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: #E5E5E5;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}

/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
a:link,a:active,a:visited { color : #006699; }
a:hover { text-decoration: underline; color : #DD6900; }
hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}


/* This is the border line & background colour round the entire page */
.bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; }

/* This is the outline round the main forum tables */
.forumline { background-color: #FFFFFF; border: 2px #006699 solid; }


/* Main table cell colours and backgrounds */
td.row1 { background-color: #EFEFEF; }
td.row2 { background-color: #DEE3E7; }
td.row3 { background-color: #D1D7DC; }


/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: #FFFFFF;
background-image: url(images/cellpic2.jpg);
background-repeat: repeat-y;
}

/* Header cells - the blue and silver gradient backgrounds */
th {
color: #FFA34F; font-size: 11px; font-weight : bold;
background-color: #006699; height: 25px;
background-image: url(images/cellpic3.gif);
}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(images/cellpic1.gif);
background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
}


/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; }
td.row3Right,td.spaceRow {
background-color: #D1D7DC; border: #FFFFFF; border-style: solid; }

th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }


/* The largest text used in the index page title and toptic title etc. */
.maintitle,h1,h2 {
font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
text-decoration: none; line-height : 120%; color : #000000;
}


/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; }
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: #DD6900; text-decoration: underline; }


/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : 11px; color : #000000 }
a.mainmenu { text-decoration: none; color : #006699; }
a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }


/* Forum category titles */
.cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
a.cattitle { text-decoration: none; color : #006699; }
a.cattitle:hover{ text-decoration: underline; }


/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: 12px; color : #006699; }
a.forumlink { text-decoration: none; color : #006699; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }


/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: 11px; color : #000000;}
a.nav { text-decoration: none; color : #006699; }
a.nav:hover { text-decoration: underline; }


/* titles for the topics: could specify viewed link colour too */
.topictitle { font-weight: bold; font-size: 11px; color : #000000; }
a.topictitle:link { text-decoration: none; color : #006699; }
a.topictitle:visited { text-decoration: none; color : #5493B4; }
a.topictitle:hover { text-decoration: underline; color : #DD6900; }


/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */
.postdetails { font-size : 10px; color : #000000; }


/* The content of the posts (body of text) */
.postbody { font-size : 12px;}
a.postlink:link { text-decoration: none; color : #006699 }
a.postlink:visited { text-decoration: none; color : #5493B4; }
a.postlink:hover { text-decoration: underline; color : #DD6900}


/* Quote & Code blocks */
.code {
font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

.quote {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}


/* Copyright and bottom info */
.copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
a.copyright { color: #444444; text-decoration: none;}
a.copyright:hover { color: #000000; text-decoration: underline;}


/* Form elements */
input,textarea, select {
color : #000000;
font: normal 11px Verdana, Arial, Helvetica, sans-serif;
border-color : #000000;
}

/* The text input fields background colour */
input.post, textarea.post, select {
background-color : #FFFFFF;
}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */
input.button {
background-color : #EFEFEF;
color : #000000;
font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}

/* The main submit button option */
input.mainoption {
background-color : #FAFAFA;
font-weight : bold;
}

/* None-bold submit button */
input.liteoption {
background-color : #FAFAFA;
font-weight : normal;
}

/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: #DEE3E7; border-style: none; }


/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("formIE.css");


Thanks in advance,
Last edited by Volion on Tue Nov 11, 2003 11:21 pm, edited 1 time in total.
Image
Proud supporter of phpBB-RPG.com.

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty »

here it is in your code:

td.rowpic {
background-color: #FFFFFF;
background-image: url(images/cellpic2.jpg);
background-repeat: repeat-y;
}
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

HungSquirrel
Registered User
Posts: 46
Joined: Sun Oct 26, 2003 12:59 am
Contact:

Post by HungSquirrel »

If you choose to make the cells a clickable link, such as with the code CyberAlien provided:

Code: Select all

onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"
...you might want to add this piece of code as well. This will help IE users realize that the cell is clickable by turning your mouse pointer into the one that appears when you mouse over a link.

Code: Select all

style="cursor:hand;"
Image

Volion
Registered User
Posts: 94
Joined: Sun Nov 09, 2003 5:25 pm
Contact:

Post by Volion »

where do I add the code to make it clickable?

Edit: for referenced material
Last edited by Volion on Tue Nov 11, 2003 11:22 pm, edited 1 time in total.
Image
Proud supporter of phpBB-RPG.com.

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty »

that depends on what cell you want to make clickable.

if forum cell on index page then change this <td> in index_body.tpl:

Code: Select all

<td class="row1" width="100%" height="50">
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Volion
Registered User
Posts: 94
Joined: Sun Nov 09, 2003 5:25 pm
Contact:

Post by Volion »

Thanks for all the help.
Last edited by Volion on Tue Nov 11, 2003 11:22 pm, edited 1 time in total.
Image
Proud supporter of phpBB-RPG.com.

HungSquirrel
Registered User
Posts: 46
Joined: Sun Oct 26, 2003 12:59 am
Contact:

Post by HungSquirrel »

Threads aren't deleted. You're not the only one with these questions. I too wanted to change my mouseover color, but was too lazy to dig through the code to do so.

CyberAlien to the rescue. 8)
Image

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty »

Yes, threads are never deleted. And this thread is useful so it will be here - someone might need this information too.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

thoery6
Registered User
Posts: 10
Joined: Mon Oct 27, 2003 10:48 am
Location: Canada
Contact:

Post by thoery6 »

hello... in which file do I have to paste this code?
onmouseover="this.style.backgroundColor='#F8F9FC';" onmouseout="this.style.backgroundColor='#EFF2F9';"
does it go in ie.css or some other file?
***** The end is just the beginning****

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty »

Please read posts above:
CyberAlien wrote: if forum cell on index page then change this <td> in index_body.tpl:

Code: Select all

<td class="row1" width="100%" height="50">
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

thoery6
Registered User
Posts: 10
Joined: Mon Oct 27, 2003 10:48 am
Location: Canada
Contact:

Post by thoery6 »

Hi again!
So I opened my indexbody.tpl and there I pasted this code on the top.
<td>onmouseover="this.style.backgroundColor='#F8F9FC';"</td> <td>onmouseout="this.style.backgroundColor='#EFF2F9';"</td>

On my forum, I got this error:

onmouseover="this.style.backgroundColor='#F8F9FC';" onmouseout="this.style.backgroundColor='#EFF2F9';" The time now is Thu Nov 13, 2003 1:00 am
theory6 Forum Index

Can you please direct me to a exact line to paste my code? :(
***** The end is just the beginning****

HungSquirrel
Registered User
Posts: 46
Joined: Sun Oct 26, 2003 12:59 am
Contact:

Post by HungSquirrel »

It looks like you don't have much experience with HTML and CSS. I think the first thing you should do is to look for tutorials on them. Webmonkey has a few easy and intermediate ones.

That said, look for the following in index_body.tpl (it may not be exactly like this):

Code: Select all

<!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><a href="{catrow.forumrow.U_VIEWFORUM}"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" border="0" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></a></td>
   <td class="row1" width="100%" height="50">
Replace the <td class="row1" width="100%" height="50"> with:

Code: Select all

<td class="row1" width="100%" height="50" style="cursor:hand;" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}';" onmouseover="this.style.backgroundColor='#0B140B';" onmouseout="this.style.backgroundColor='#0E100E';">
You can change the colors (#0B140B, etc.) to whatever hexadecimal value you want. Please back up your index_body.tpl file before making any changes! That way, if you mess something up, you can always fix it.
Image

thoery6
Registered User
Posts: 10
Joined: Mon Oct 27, 2003 10:48 am
Location: Canada
Contact:

Post by thoery6 »

thank you very much.
***** The end is just the beginning****

Locked

Return to “[2.0.x] Styles Development & Discussion”