Every other row (background color)
I want to keep it simple and in css. How can I get this to work properly so every other row has a yellowish background color with no gaps between the words.
This is what I have but its producing an odd result.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
margin: 0px;
padding: 0px;
div#footer{
height:auto;
background-color:green;
clear:both;
font-size:14px;
width:800px;
div#footer ul{
margin:0;
padding:0;
list-style:none;
div#footer li{
width:155px;
display:inline-block;
text-align:center;
vertical-align: top;
/* horizontal line breaks */
hr {
border: 0;
color: #323232;
background-color: #323232;
height: 1px;
width: 95%;
text-align: center;
.even {
background-color: #FF9;
</style>
</head>
<body>
<div id="footer">
<ul>
<li class="even">01/15/2011</li>
<li class="even">Broadway Brewhouse</li>
<li class="even">New Phila, OH</li>
<li class="even">10pm</li>
<li class="even">330-343-9231</li>
<hr />
<li>06/11/2011</li> <li>Edelwiess Inn</li> <li>Sugarcreek, OH</li> <li>10pm</li> <li>330-852-3750</li>
<hr />
<li class="even">04/09/2011</li>
<li class="even">Uhrichsville Moose Lodge (Open to the Public)</li>
<li class="even">Uhrichsville, OH</li>
<li class="even">TBD</li>
<li class="even">740-922-9098</li>
<hr />
<li>01/15/2011</li> <li>Broadway Brewhouse</li> <li>New Phila, OH</li> <li>10pm</li> <li>330-343-9231</li>
</ul>
</div>
</body>
</html>
To create coloured backgrounds to every other row use this.
#averages tr:nth-of-type(odd) {
background-color:#ccc;
Substitute the id of your table for mine and change the colour code to suit.
Similar Messages
-
Does anyone knows how to highlight every other row in numbers mac
Does anyone knows how to highlight every other row in numbers and are there any good tutorials out there???
Hi Lee,
Select a non-header cell in the table.
Open the Inspector and choose the Table Inspector.
Click to check the 'Alternating Row Color' box in the Cell Background section.
Click the Color well beside the check box to open the Color pane.
Choose a colour.
The alternating colours are applied only to the non-header rows and non-header columns in your table.
Regards,
Barry -
WorkOrderList TileView Row & Selected Row Background Color Change
Hi,
can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
but these applied style on Rows & Selected Rows are not working in Agentry client.
if any other alternate solution exist in Agentry, please guide me.
i am using following...
sap mobile platform-2.3.3
Thanks & Regard
Manish Kumar
Tags edited by: Michael ApplebyHi Jason
Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
Please guide me how to remove white outline and default Blue Selected Background color.
Thanks & Regard
Manish Kumar -
AdvancedDataGrid Row background color
Hope someone can help, I wish to highlight an entire row or rows that match a value. I assumed the stylefunction would get me there but I have not found the style refering to the row background color.
Any help please.
Thank YouThe solution I found was to extend the data grid class, add override to the draw background and add a rowcolorfunction. When using item renderers you must use the style function with the alternatingItemColors so the renderer gets the color correct and not opaque.
Thanks looking saisri2k2. -
Row background color in dataTable control based on criteria
It is relatively straightforward to give a pattern of color to rows in a dataTable control, for instance to alternate colors from white to gray.
However, I have not yet figured how the row background color could be decided based on data fields associated with each row. For instance, I would like to set the row background color based on the value of a boolean attribute associated with the row, e.g. white if value is false and gray if it is true.
Is there an easy way to do this?
Martinof the text, but not the whole cell. I need to find a
way to change the span at the row level (on the <tr>
tag). ANy ways to do this?
MartinThis is a question of how to let the renderer adjust its behaviour depending on the current state of the model. My renderer changes the background for the selected row by changing the style class:
writer.startElement("tr", table);
if (table.getRowSelector())
if (table.isAtSelectedRow())
writer.writeAttribute("class", "selectedRow", null);
etc.(of course, to be able to do this you must write your own renderer)
erik -
Advanceddatagrid grouped row background color
Hi All,
How to create a grouped row background color in advancedatagrid eg:
Features
Product 1
Product 2
Group1
aa
copy
copy
aa
copy
copy
Group 2
bb
copy
copy
bb
copy
copy
Thanks,
srinathThe solution I found was to extend the data grid class, add override to the draw background and add a rowcolorfunction. When using item renderers you must use the style function with the alternatingItemColors so the renderer gets the color correct and not opaque.
Thanks looking saisri2k2. -
Html query report /every other row grey
Hello
i have this query to html report
do you know how to make every other row grey in the out pu of
the query.
and where do i put it in this code below?
thanks in advance
<cfquery name="GetCompanies"
datasource="#Request.MainDSN#">
SELECT
CompanyID,
CompanyName,
Address,
City,
State,
ZipCode,
Comments
FROM
Company
ORDER BY
CompanyName ASC
</cfquery>
<html>
<head>
<title>ColdFusion MX Bible</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Company List</h1>
<TABLE width=100% align="left" border="4" rules="all">
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>ZIP Code</b></td>
<td> </td>
</tr>
<cfoutput query="GetCompanies">
<tr>
<td>#CompanyID#</td>
<td>#CompanyName#</td>
<td>#Address#</td>
<td>#City#</td>
<td>#State#</td>
<td>#ZipCode#</td>
<td>
<a
href="EmployeeList.cfm?CompanyID=#CompanyID#">Employees</a>
<a href="CompanyAddForm.cfm">Add</a>
<a
href="CompanyEditForm.cfm?CompanyID=#CompanyID#">Edit</a>
<a
href="CompanyDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
</td>
</tr>
</cfoutput>
</TABLE>
</body>
</html>The fastest, but crudest and ugliest.
<cfoutput query="GetCompanies">
<tr #IIF(GetCompanies.CurrentRow MOD
2,DE(''),DE('backgroundColor="##999"'))#>
kellyhondalovesmusic wrote:
> Hello
> i have this query to html report
> do you know how to make every other row grey in the out
pu of the query.
> ??
>
>
> and where do i put it in this code below?
>
>
>
> thanks in advance
>
>
>
> <cfquery name="GetCompanies"
> datasource="#Request.MainDSN#">
> SELECT
> CompanyID,
> CompanyName,
> Address,
> City,
> State,
> ZipCode,
> Comments
> FROM
> Company
> ORDER BY
> CompanyName ASC
> </cfquery>
>
> <html>
> <head>
> <title>ColdFusion MX Bible</title>
> <link rel="stylesheet" href="styles.css">
> </head>
>
> <body>
>
> <h1>Company List</h1>
>
> <TABLE width=100% align="left" border="4"
rules="all">
> <tr>
>
> <td>
ID</td>
> <td>
Name</td>
> <td>
Address</td>
> <td>
City</td>
> <td>
State</td>
> <td>
ZIP Code</td>
> <td> </td>
> </tr>
> <cfoutput query="GetCompanies">
> <tr>
>
> <td>#CompanyID#</td>
> <td>#CompanyName#</td>
> <td>#Address#</td>
> <td>#City#</td>
> <td>#State#</td>
> <td>#ZipCode#</td>
> <td>
> <a
href="EmployeeList.cfm?CompanyID=#CompanyID#">Employees</a>
> <a href="CompanyAddForm.cfm">Add</a>
> <a
href="CompanyEditForm.cfm?CompanyID=#CompanyID#">Edit</a>
> <a
href="CompanyDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
> </td>
> </tr>
> </cfoutput>
> </TABLE>
>
> </body>
> </html>
>
> -
Query output skipping every other row
I am using Coldfusion MX 7.0.1, and have two applications
using the same datasource. In one, a SELECT query followed by a
cfoutput lists all rows properly, but the following code (in the
other app) only lists every other row of the query result set, for
some reason:
<cfselect name="Record_Group" multiple="no" size="4"
required="yes" message="Select a Record Group...">
<cfoutput query="RecordGroupQ">
<cfif
compare(#RecordGroupQ.RecordNum#,#Edit_origQ.acc_num#) eq 0>
<option value="#RecordGroupQ.RecordNum#"
selected>#RecordGroupQ.RecordNum#</option>
<cfelse>
<option
value="#RecordGroupQ.RecordNum#">#RecordGroupQ.RecordNum#</option>
</cfif>
</cfoutput>
</cfselect>
The query is in the <head>, and is:
<cfquery name="RecordGroupQ" datasource="arch_card">
SELECT RecordNum FROM RecordGroups ORDER BY RecordNum ASC;
</cfquery>
Has anyone seen anything like this before?
Thanks,
JasonDan Bracuk wrote:
> As an aside, you don't want semi-colons in cfqueries.
that's interesting... why is that so? i have been wondering
about
semi-colons lately myself, but could not find a definite
explanation/rule/guide/best practice on whether to use them
or not...
could you please explain, Dan?
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com -
How can I automatically delete every other row in a Numbers spreadsheet?
Thanks a lot.
It's what we spell "Un rang sur deux".
Automatic translator just replaced Engish words by French ones returning :
Chaque autre rangée
or
toutes les autres lignes
which had really no link with even/odd.
It's a nice day, not only the sun shine but I learnt something new
Yvan KOENIG (VALLAURIS, France) mardi 9 août 2011 16:42:55
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
Hello all. I am once again stumped and would very much appreciate any help.
I have a folder with many text files such as this...
A 2013-03-31.txt
A 2013-06-30.txt
A 2013-09-30.txt
A 2013-12-31.txt
A 2014-03-31.txt
A 2014-06-30.txt
A 2014-09-30.txt
B 2013-03-31.txt
B 2013-06-30.txt
B 2013-09-30.txt
B 2013-12-31.txt
B 2014-03-31.txt
B 2014-06-30.txt
B 2014-09-30.txt
…and so on…
and I'm loading all of the files beginning with A to an existing table in SQL Server. I'm loading the data as is to a staging table, no data type conversions, and I add only two derived columns. I have a loop to accomplish this, and it's working perfectly
except for one detail. All of the files in 2013 load every other row. All of the 2014 files load all rows as intended.
Any idea what would cause this? All files are being loaded using the same loop, same variables, same everything. My enumerator on the for each loop is Foreach File. The DataRowsToSkip property on the flat file connection manager is 0. I'm not sure where
to look next. I need all rows in all files to be loaded.
Forgot to mention that there is a difference between the 2013 and 2014 files. The 2014 files have 8 additional columns. I suspect this is causing my issue, just not sure what to do about it.
Thanks for any help you can provide!
WeeLassIn SSIS 2012 and above these additional columns would not cause a failure, but looks like lead to you having impartial loads.
I suggest you create two loops, one for one metadata - files from 2014 and another for 2013 ones.
Arthur
MyBlog
Twitter -
ADF Table row background color change ???
Hi All
i got below sql view object
SELECT DEPARTMENT_ID,JOB_ID,COUNT(*) FROM EMPLOYEES GROUP BY DEPARTMENT_ID,ROLLUP(JOB_ID)
By using this i will get each department_id, jobid's and total employes count in each department
and i will get rollup for each departments ie i will get total employees.
So i want to change the back ground of the total row.
DepartmentId JobId Count1
SA_REP 1
1
10 AD_ASST 1
10 1 < this row in RED back ground in JSF page
20 MK_MAN 1
20 MK_REP 1
20 2 < this row in RED back ground in JSF page
30 PU_MAN 1
30 PU_CLERK 5
30 6< this row in RED back ground in JSF page
40 HR_REP 1
40 1< this row in RED back ground in JSF page
50 ST_MAN 5
50 SH_CLERK 20
50 ST_CLERK 20
50 45< this row in RED back ground in JSF page
any kind of help is welcome...
thanks
RaviHi,
you can do this by setting the background color of the outputText component that is the cell component e.g. in a read only table. Use the inlineStyle property to set the background-color but get the string from a managed bean. For each row you get a call to the managed bean and you can use JSF value binding
FacesContext.getCurrentInstance().getApplication().createValueBinding()
to access #{row} so that you can determine the value of a row column. Based on this you return a color
Frank -
How to set JTable row background color
Hello,
I have seen JTable with rows having alternate background color (mostly white and light blue). How can i set the same.
Thanks,
DeepakWell, i am new user to forum and so have no idea if this question has been asked previously "countless" times.Which is why you "search first" and "ask later". How to you expect to find out what valuable information is in the forum without learning how to do a simple search. This goes for any forum on the web you might use, so don't use the "I'm a new user" excuse.
-
WAD - Portal - Changing row background colors
Hi,
We are creating web templates and posting to portal 6.0. I would like to know how to change the background colors for the rows for the output of the analysis item. Right now the default colors are grey and white (alternating rows). I did a search in the forum and it appears that there is no straightforward way to do it, with some suggesting we do it directly in the portal. Can someone provide detailed step by step instructions on how to change the background colors for rows for query output.
Thanks,
Anita S.You can modify the CSS (Cascading Style Sheet) in either Portal or WAD. If you change it in Portal, it will be global for all reports viewed in the portal.
For WAD, there is a general template parameter which contains the path to the .CSS file. This CSS file is located in the Mime Repository (SE80). Make the change to the css file in the mime repository and you're good to go.
If you change the Portal CSS file, there is a wizard that can help you define colors for tables and preview them. -
Af:table: defining row background color based on a condition
I want to display log objects (priority, name, detail) in a tab.
The background color must be green for priority "DEBUG" and red for priority "WARN".
It seems that in the table component, we can only control the column aspect and the output text inside...
I'have read some posts (Franck N.) and it seems not possible to have an action of the row (all columns) background color...
What can be the workarround ? other <af:?> component ???
Is it now possible with the new JDEV11 components ?
<af:table partialTriggers="pollRefresh" emptyText="No items were found"
value="#{backing_logviewer.logViewerList}" var="log"
rows="50">
<f:facet name="detailStamp"/>
<af:column sortable="true" headerText="Prio" formatType="text"
sortProperty="prio">
<af:outputText value="#{log.prio}"/>
</af:column>
<af:column sortable="true" headerText="Cat" formatType="text"
sortProperty="cat">
<af:outputText value="#{log.cat}"/>
</af:column>
<af:column sortable="false" headerText="Msg" formatType="text">
<af:outputText value="#{log.msg}"/>
</af:column>
<af:column sortable="false" headerText="Thread" formatType="text">
<af:outputText value="#{log.thread}"/>
</af:column>
<af:column sortable="false" headerText="Info" formatType="text">
<af:outputText value="#{log.info}"/>
</af:column>
<af:column sortable="false" headerText="Log Date" formatType="text">
<af:outputText value="#{log.logDate}" converter="dateConverter"/>
</af:column>
<af:column sortable="false" headerText="Throwable"
formatType="text">
<af:outputText value="#{log.throwable}"/>
</af:column>
</af:table>Thanks for your answer.
Your solution is not working but if i put the styleclass instruction in the outputText element, it is working...
Is there any other solution ???... because in this solution, we are obliged to put this EL in each outputText element of the tab.
<af:column sortable="true" headerText="Cat" formatType="text"
sortProperty="cat">
<af:outputText value="#{log.cat}" styleClass="#{(log.prio == 'DEBUG') ? 'bgDebug' : (log.prio == 'WARN' ? 'bgWarn' : '')}"/> </af:column> -
How to make the shade for every other row?
Hi,
i want the rows in my report dispalyed as:
row1: gray
row2: white
row3: gray
row4: white
row5: gray
thanxHello,
Highlight every alternate row
Highlight every alternate row
Regards
Maybe you are looking for
-
I have just upgraded to SQL Developer 2.1 and there seems to be a problem with filtering information in the Data tab. The filters I type in are simply ignored. Is there a setting somewhere that I am missing?
-
IMac's headphone jack doesn't respond
I have had external speakers connected to the headphone jack for many months, and recently after a brief power outage at our house, somehow the Mac no longer recognizes the speakers. Restart didn't solve anything--.Red light is not on in the jack. W
-
I am using receiver mail adapter. Everything is working fine. Mail content has several fields, which are concatenated into 'content'. But the users want to see the content of the email in several lines (rather than one string). I tried to change the
-
Importing native xml in to semi structured storage
hello, how store the a bibliographic data in the native xml and import or export that data into to the semi structured storage. What are the ways we query the xml database. Eagerly waiting for the reply Cheers Akhil Thank you in advance
-
I know everyone on here loves their new phone INCLUDING myself but coming from my Droid 2 I have noticed a many Pro's and Con's of my new Iphone...Anyone else have any Input? Pro's Smooth iOS Responsive Screen Beautiful design Music Friendly Variety