[dataTable] fixed header and scrollable content all-in-one
Hi folks,
In your opinion, how can I use CSS like here (see [http://www.imaputz.com/cssStuff/bigFourVersion.html] or [http://web.tampabay.rr.com/bmerkey/examples/nonscroll-table-header.html]) in a "h:dataTable", to have a fixed header? Have you a quick example?
Thank you very much for your support.
G.
The h:dataTable just renders a HTML table. Apply the same using the standard attributes and standard way of writing CSS.
Similar Messages
-
White space between header and main content
Hello all! I have a 25-27px white space between my header and
main content. I read through fixes in the forum and took out any
height that would effect this gap. I still can't get rid of this
white space. Your help is greatly appreciated! Here's the Code:
<!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>
</script>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and
padding of the body element to account for differing browser
defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5*
browsers. The text is then set to the left aligned default in the
#container selector */
color: #000000;
.oneColElsCtrHdr #container {
width: 46em; /* this width will create a container that will
fit in an 800px browser window if text is left at browser default
font sizes */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a
width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center
on the body element. */
.oneColElsCtrHdr #header {
padding-top: 0;
padding-right: 0px;
padding-bottom: 0;
padding-left: 0px;
background-color: #FFFFFF;
.oneColElsCtrHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the
#header div will avoid margin collapse - an unexplainable space
between divs. If the div has a border around it, this is not
necessary as that also avoids the margin collapse */
padding: 0px 0; /* using padding instead of margin will
allow you to keep the element away from the edges of the div */
.oneColElsCtrHdr #mainContent {
background: #FFFFFF;
padding-top: 0;
padding-right: 0px;
padding-left: 0px;
.oneColElsCtrHdr #footer {
padding: 0 10px; /* this padding matches the left alignment
of the elements in the divs that appear above it. */
background:#DDDDDD;
.oneColElsCtrHdr #footer p {
margin: 0; /* zeroing the margins of the first element in
the footer will avoid the possibility of margin collapse - a space
between divs */
padding: 0px 0; /* padding on this element will create
space, just as the the margin would have, without the margin
collapse issue */
.style4 { font-family: "Fiolex Girls", "Arial Narrow";
color: #FF0000;
font-size: xx-large;
font-style: italic;
.style6 {color: #FF0000}
.style7 { color: #000000;
font-size: x-small;
.style9 {color: #FF0000; font-family: Arial, Helvetica,
sans-serif; }
-->
</style>
<script src="SpryAssets/SpryMenuBar.js"
type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css"
rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#apDiv1 {
position:static;
width:525px;
height:250px;
z-index:1;
float: left;
border-bottom-color: #000000;
border-bottom-style: solid;
border-top-width: thin;
border-bottom-width: thin;
border-color: #000000;
#apDiv3 {
position:static;
width:500px;
height:0px;
z-index:1;
left: 465px;
top: 410px;
float: right;
.style14 {
font-size: medium;
font-style: italic;
font-weight: normal;
.style15 {font-size: small}
-->
</style>
<link href="p7hscroller/s7/p7HSM07.css" rel="stylesheet"
type="text/css" media="all" />
<script type="text/javascript"
src="p7hscroller/p7hsmscripts.js"></script>
<style type="text/css">
<!--
#apDiv7 {
position:static;
width:737px;
height:0px;
z-index:2;
bottom: 0px;
border-bottom-style: solid;
border-bottom-width: thin;
.style16 {font-size: x-small}
-->
</style>
<!-- Do not remove the line below!!! It is required for
the XML Flash Slideshow v3. -->
<script type="text/javascript"
src="slideshow.js"></script>
</head>
<body class="oneColElsCtrHdr">
<div id="container">
<div id="header">
<pre><span
class="style4">US-AsianMates</span><span
class="style6">.com</span> <strong><span
class="style9">JOIN FOR FREE <span
class="style7">OR</span> MEMBER LOG
IN</span></strong>
</pre>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li>
<div align="center"><a href="#"
class="style16">HOME</a> </div>
</li>
<li>
<div align="center"><a href="#"
class="style16">ABOUT US</a></div>
</li>
<li>
<div align="center"><a href="#"
class="style16">WHY JOIN US?</a> </div>
</li>
<li>
<div align="center"><a href="#"
class="style16">VISA SUPPORT</a></div>
</li>
<li>
<div align="center" class="style16"><a
href="#">EVENTS</a></div>
</li>
</ul>
<pre><!-- end #header -->
</pre>
</div>
<div id="mainContent">
<div id="apDiv1"><img
src="Images/Outdoor_Bride1.jpg" alt="Bride" name="Bride"
width="525" id="Bride" /></div>
<p> </p>
<p><br>
</p>
<pre>
</pre>
<table width="200" border="1" align="left">
<tr>
<td><img src="Romantic_Kiss.jpg" alt="VISA"
name="VISASUPPORT" width="200" id="VISASUPPORT" /></td>
</tr>
<tr>
<td><img src="Surfing_At_Home.jpg" alt="JOIN"
name="WHYJOIN" width="200" id="WHYJOIN" /></td>
</tr>
</table>
<pre></pre>
<div id="apDiv3">
<div align="center">
<div align="left">
<pre class="style14"> <strong>LIVING
PROOF</strong>
<span class="style15">"12 YEARS AGO I WENT TO
THE PHILIPPINES IN HOPES
OF FINDING MY FUTURE WIFE. 11 YEARS LATER,
I AM HAPPILY MARRIED! WE ALSO HAVE AN ENERGETIC
5 YEAR OLD SON! DREAM IT, LIVE IT! IT CAN
HAPPEN TO YOU ON US-ASIANMATES.COM
CHRIS"</span></pre>
</div>
</div>
</div>
<pre> </span>
</pre></pre>
<p><!-- end #mainContent -->
<br>
<pre>
</pre>
<div id="apDiv7"></div>
<div align="center">
<pre><!-- Begin XML Flash Slideshow v3 -->
<script type="text/javascript">
// <![CDATA[
XMLFlashSlideshow_v3({swf:'slideshow.swf',w:'580',h:'140',redirect:'',usePreloader:'true', xml:'slideshow_data0.xml',preventCache:'true',disableMultipleXML:'false',initXML:'%3C?xml% 20version=%221.0%22%20encoding=%22utf-8%22?%3E%3Cslideshow%20version=%223%22%3E%3Cstyles%3 E%3CPreloader%20label=%22Loading%20%7BN%7D%2525%22%20iconColor=%22#666666%22%20iconAlpha=% 2270%22%20iconWidth=%2250%22%3E%3C/Preloader%3E%3CPreloaderLabel%20font=%22Verdana%22%20si ze=%2210%22%20color=%22#666666%22%20bold=%22false%22%3E%3C/PreloaderLabel%3E%3CBackground% 20backgroundColor=%22#FFFFFF%22%20backgroundAlpha=%22100%22%20bevelColor=%22#FFFFFF%22%20b evelStrength=%2270%22%20borderWidth=%222%22%20borderColor=%22#000000%22%3E%3C/Background%3 E%3CLoaderAnimation%20type=%22circle%22%20color=%22#FFFFFF%22%20alphaBackground=%2220%22%2 0alphaInner=%2240%22%20frameWidth=%222%22%20width=%2250%22%20height=%2250%22%3E%3C/LoaderA nimation%3E%3CDataLoader%20useAnimation=%22true%22%20useLabel=%22true%22%20labelPlacement= %22bottom%22%20fadeOutDuration=%22400%22%20textFormat=%22loader_text%22%3E%3C/DataLoader%3 E%3C/styles%3E%3Clocalization%3E%3Ctext%20orig=%22Loading%20Data...%22%20local=%22Loading% 20Data...%22%3E%3C/text%3E%3C/localization%3E%3Cfonts%3E%3Cfont%20id=%22loader_text%22%20n ame=%22Pixelade%22%20embed=%22true%22%20size=%2213%22%20color=%22#666666%22%20bold=%22fals e%22%20selectable=%22false%22%20align=%22left%22%3E%3C/font%3E%3C/fonts%3E%3C/slideshow%3E '});
// ]]>
</script>
<!-- End XML Flash Slideshow v3 -->
</pre>
</div>
<pre>
</pre>
<pre> </pre><!-- -->
<pre> </pre>
</div>
<div id="footer">
<p>Footer</p>
<!-- end #footer --></div>
<!-- end #container --></div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1",
{imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>"phillychris" <[email protected]> wrote in
message
news:[email protected]...
> Yep, it was the 1 pre tag creating the gap. So why is
this page a
> disaster, Tim?
Just because something is created in DW CS3 doesn't mean it's
not a
disaster, any more than using DeWalt power tools guarantees
that my
carpentry won't be a complete mess. The software is not a
replacement for
skills. It is a tool; your workflow and understanding of HTML
and CSS is
what allows you to use DW effectively.
So why did I call this page a disaster? When I see all that
extra markup,
spans, and inline tags, I shudder. It's way too hard to
troubleshoot. You're
not doing nearly enough with descendant selectors; instead,
most of your
code is inline, despite a huge CSS file.
Just one example: individual li tags with div align="center"
inside of them.
Way overkill. If you're centering all the li text in a given
list, control
it with CSS and kill all that extra markup.
E.g.
.MenuBarHorizontal li { text-align:center; }
In fact, if all there is in that .MenuBarHorizontal is the
list, you don't
even need to specify the list in the CSS. Just do:
.MenuBarHorizontal { text-align:center; }
Now you don't need div tags inside your li at all.
And if all of those a tags in that menu are going to be
.style16 class,
don't specify it on each link. In fact, don't even have a
.style 16 class.
Heck, since it's just specifying font size, you don't need to
target the a
tag at all. Just add font-size:x-small; to the
.MenuBarHorizontal ruleset I
gave you above.
The above are just examples from a quick glance at your code.
On the whole,
your markup and approach to styles are largely wasting the
power and point
of CSS.
In addition, several styles spanned onto one line of text...
a sure sign
that either you are using far too many styles to make design
sense, or else
you've got styles that overlap each other.
Here's my advice: Until you get a better handle on CSS, don't
style things
as you go. Forget styles altogether at the start. Create a
very clean HTML
markup and put ID and class selectors on things you know will
need them.
Preferably, place the HTML elements in the order you would
want your page
read if styling did not even exist, nesting elements where
necessary.
After you have created all the HTML structure, then go back
and style the
elements via CSS only. You will end up with less page weight
and far cleaner
code to decipher, not simply in terms of length but in terms
of conflicts
and redundancies.
If you're really insistent on styling things as you go, at
least do this:
don't create a new style every time you want to accomplish
something. Create
CSS rules for IDed containers and container classes. Then as
you go along
and are about to create a style, ask yourself where you are
and what all
this new rule needs to apply to. Specify the rule there,
under the selector
you've already created. Then you won't have .style1 -
.style16 like you do
now, and you won't have all that inline mess of code to sort
through.
Finally - as you create your CSS, discipline yourself to
avoid style spans.
They are necessary on the odd occasion, but very rarely.
Think semantically
(i.e. purpose of the style point you're making at a given
time).
For example, if you're tempted to create a span in order to
put something in
bold red, ask yourself: "Why?" Generally, it means you want
to place special
emphasis or strength on that. Well, in that case you don't
need a span. You
need to be using the proper tag, such as <em>
(emphasis) or <strong>. Then
you can style that tag in CSS. That way, what you have in
your page actually
makes sense apart from the style, and as a bonus you can
apply or edit your
style easily.
Tim G.
http://www.pactumweb.com
http://www.shortordersite.com
Be smart:
http://www.pactumweb.com/client/tips.php -
when i updated my iPhoto on my macbook my whole computer lost photos, music, documents ect, how do i fix this and get them all back?
Which os do you have? Which version of iPhoto did you update to? Did you check iPhoto's trash? Finder's trash? Did you repair permissions and restart your computer after updating?
Data recovery utilities - "Data Rescue II"
VirtualLab™ Data Recovery
DriveSavers Data Recovery
http://www.stellarinfo.com
FileSalvage -
I changed my Apple ID and had problems with my Account.Once iTunes Store had sorted those out I decided to back up on my 3 devices.Now my Notes and Reminders are all old ones and the new ones I created in the last few days have disappeared.
Ok. Found something that said to shut down and hold the option, command, p, and r keys on restart. Held them down for a few restarts and everything automatically signed in and works. Woohoo!!!
-
My emails show only the header and no content or attachments ?
My emails show only the header with no content or attachments on my iPad?
Quit the mail app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
If that doesn't work, reset the iPad.
Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. -
I would like to pin header and have content in body go underneath the header
Is this possible to do in muse? Currently the way that I have it set up all of the content is scrolling on top of the content? What do I need to do for the pinned header content to go behind? Thanks
Hello,
For this, create another layer in the layers panel and place it on top of the other layers. Then right click on the Pinned Header and place it in the layer which is at the top.
This way the Pinned header will stay on top and content will scroll behind it.
Regards,
Sachin -
Fixed Column and Scrollable JTable problems
I've implemented a table that has the first column fixed, while 2nd to end are scrollable.
following the fixedModel examples, i am able to get this working..but im not able to update it. the exmples tho, subclass AbstractTableModel and use anonymous classes to define it...mine uses a class that subclasses DefaultTableModel..but DefaultTableModel subclasses AbstractTableModel...so i think it should be ok.
i have 2 table models, one for the fixed, and one for the scrollable..they use the same data/column arrays...then i create 2 tables that with these models...
initially i have no data Object[][] data = new Object[0][0]) and a bunch of column names
it works fine..but i have trouble updating it with real data
i use fixedModel.setDataVector(...) and scrollModel.setDataVector(...) to update...but it doesnt work..i dont get any exceptions or anything..just nothing comes up...revalidating the tables doesnt work
if i choose not to use the fixed/scrollable tables..and just use one normal table with setDataVector..it works fine
any ideas?
heres the code:
fixedModel = new SortableTableModel() {
/* for sorting to work correctly */
public Class getColumnClass(int col) {
return getValueAt(0, col).getClass();
public boolean isCellEditable(int row, int col) {
return false;
//new methods
public int getColumnCount() {
return 1;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return (String)columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][0];
fixedModel.setDataVector(data,columnNames);
scrollModel = new SortableTableModel() {
public Class getColumnClass(int col) {
return getValueAt(0, col).getClass();
public boolean CellEditable(int row, int col) {
return false;
//new methods
public int getColumnCount() {
return columnNames.length -1;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return (String)columnNames[col+1];
public Object getValueAt(int row, int col) {
return data[row][col+1];
public void setValueAt(Object obj, int row, int col) {
data[row][col +1] = obj;
scrollModel.setDataVector(data, columnNames);
ListSelectionModel lsm = fixedTable.getSelectionModel();
lsm.addListSelectionListener(new SelectionListener(true));
lsm = scrollTable.getSelectionModel();
lsm.addListSelectionListener(new SelectionListener(false));
fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
scrollTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
JViewport viewport = new JViewport();
viewport.setView(fixedTable);
viewport.setPreferredSize(fixedTable.getPreferredSize());i really need to get this fixed..thanks for the help!i fixed the problem a couple days ago
my anonymous class for the fixed and scrollable table models defines the data given from a 2D Object array..and not a vector of vectors, which i was using when setting the data :P
oops...
thanks for the help tho. -
Print Head for our C7280 All In One Printer
We have a C7280 All in One Printer in the office/ Our repairman told us to order all new color cartridges for it before he could fix it. We did that, however, today he told us the print head was bad and that we would be better off to buy a new printer than fix the C7280. He told us he could not get parts for our printer anymore. If it is the print head, can this printer be fixed?
That is the only way you can clean the ink cartridges. I would recommend contacting HP technical support for further assistance. Click here to find out: HP Worldwide Contact.
Good luck.
I worked on behalf of HP. -
Hp vista and officejet j4680 all in one problems since windows 8
i have an hp officejet j4580 all-in-one and have not been able to use it since installing window 8 and now my entire desk top options has disappeared, i have to go to an email and attach a file to see my documents..help
Hi there,
Try downloading and running the print and scan doctor located here:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03275041&cc=us&dlc=en&lc=en
It can fix a lot on its own and if not give a better idea of what is going on.
Best of Luck!
You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too. -
Cleaning print head HP Officejet 4315 All-in-One Printer support
Hi,
I'm having a problem with my
HP Officejet 4315 All-in-One Printer.
I'm using Windows 8 and have topped up the ink levels. The printer is printing with white lines which I understand indicates that the print heads need cleaning.
All the advice I can find online says that to run a print head clean from your computer you need to go the printer in control panel > select printer properties > then click on the 'maintenance' tab.
Using Windows 8 it appears there is no "maintenance" tab and I cant find any option to clean print heads elsewhere on the properties tab!
Not sure where to go from here?
Many thanks for your help in advance.That is the only way you can clean the ink cartridges. I would recommend contacting HP technical support for further assistance. Click here to find out: HP Worldwide Contact.
Good luck.
I worked on behalf of HP. -
Saving an invoice header and details in sql in one stored procedure.
I would like to create an invoice in visual studio 2008 with a header and x amount of details (every time it's different). I want to be able to bring it all into sql encapsulated in one begin and commit transaction so that if there is an error anywhere
on the way it can roll back and nothing will be saved to the database.
Debra has a questionI have an article on my web site which includes a sample not too different from your situation. (In the sample data is read from a file, but that has little to do with the database communication.) Since you pass the data through TVPs, you can have the transaction
in the stored procedure:
http://www.sommarskog.se/arrays-in-sql-2008.html
Erland Sommarskog, SQL Server MVP, [email protected] -
If I have multiple saved Firefox bookmark files how can I combine them all into one?
If you have JSON backups then easiest is to have two profiles open at the same time by using the -no-remote switch to open a second instance with its own profile.<br />
Then you can restore the JSON backups in one profile and copy and paste the bookmarks to the Library of the other profile.
* http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox
* http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile
*http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox -
Installing software for MAC 0S X 106.8 and ENVY 7645 all in one printer
Is there a way to download software so that my MAC OS X 10.6.8 and work with my new HP ENVY 7645 all-in-one printer?
If so, please tell me how to do that? Thanks!Hi,
I afraid not.
The printer is only supported on 10.7 or newer OS versions, as listed within the System Requirements below:
http://support.hp.com/us-en/document/c04353671/
If your Mac support Yosemite you may upgrade your operating system to 10.10 for free:
https://www.apple.com/osx/how-to-upgrade/?
The other option os to replace the printer with another model which is compatible with your operating system.
Regards,
Shlomi
Say thanks by clicking the Kudos thumb up in the post.
If my post resolve your problem please mark it as an Accepted Solution -
I was able to open a new tab and go to farmtown gifts and click "all in one click" I would stay signed in on facebook I can no longer do this and I want to know why. I can still go to google chrome and get it, but not firefox and firefox is my main browser
This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
Your system details show that toolbar in the user agent as AskTbCDS/3.12.1.16460
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
* Don't make any changes on the Safe mode start window.
* https://support.mozilla.com/kb/Safe+Mode
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
* Help > Restart with Add-ons Disabled
* Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
* https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
I just upgraded to mac osx lion and my 7410 all-in-one printer will not work
I cannot get my hp officejet 7410 all-in-one printer to work with Mac OS X Lion
hi,
check this link for Mac 10.7 installation guide.
l0ri3
~Though I work with HP my posts and replies are my own and not from HP.~
Maybe you are looking for
-
Como generar una factura de clientes con lotes
Como Generar Una factura de Clientes con lotes, es Decir buscas? Busca otros Una Lista de Materiales Con Todos SUS Hijos, Tener pecado Una generada Orden de venta. Mi codigo es el siguiente, en solitario ingreso CUANDO Que El artículo De Una Lista de
-
Navigate to different areas of a screen
Hi there, im looking for help, even if someone can point me in the right direction of a good tutorialfor this would be great. Thing is I dont even know fully how to explain. But basically what im looking to do is whats on this site: www.playgroundsfe
-
Adobe Photoshop CS6 crash message, but I have Photoshop 5.1?
Adobe Update Manager says all programs up to date. Crashes most frequently occur when using Blur or other Filters. The posted recommended "fix" 12.0.4 says it applies to AMD Catalyst, but my PC has Intel processor. It says it applies to CS6, but I
-
I am trying 2 add additional tracks via Optical Converter and have no idea how to get started. I am running: Mac OS X 10.4.11 Logic Express 7 MOTU 8pre FireWire audio interface Behringer Ultragain PRO-8 Digital ADA8000 I have the Firewire MOTU up and
-
How do I transfer files from my old drive to my new one?
I'm getting a new 500GB internal hard drive to replace the 55GB one in my 5 year old MacBook now running 10.4.11. I plan to update to 10.6, but how do I transfer all the other files and applications without reinstalling these applications?