html-table

How to get a TABLE tag's CAPTION tag to shrink to fit its contents without breaking flow

I'm trying to shrink the caption box to fit its text content. Here's what I have: Here's what I'm after: The usual methods of float, display:inline/inline-block/table all cause variants of the following: in which the caption is broken out of the flow and becomes treated as a child element of the table's box. The table code is ...

Can we solve the table row background image problem, in chrome, in multi celled tables??

It is frequently asked – but I haven’t seen a good answer yet (and I looked). If you set a background image in CSS to a table row- the image will repeat itself in every cell. If you set the position: relative (for the row) and set the background-image: none (for the cells) it solves the problem on IE but not on chrome! I can't use backgr...

jquery: ordinal of td inside tr

I have a row in an html-table that contains only images. (this happens to be the first row too). Those images are wired for a click event too. While trying to handle the click event I can find out its parent (i.e. <td> element). But I want to know its relative ordinal in the table row (<tr>). ...

How to set width of textbox to be same as MaxLength in ASP.NET

Is there a way I can limit the width of a textbox to be equal to the MaxLength property? In my case right now, the textbox control is placed in a table cell as in this snippet: <td class=TDSmallerBold style="width:90%"> <asp:textbox id="txtTitle" runat="server" CausesValidation="true" Text="Type a title h...

problem with the table width in IE?

I am using table to display a set of data, my HTML code goes here... <table border="1" cellspacing="0" cellpadding="0" style="width: 780px;"> <tbody> <tr> <td style="width: 780px; height: 25px;"> <pre width='100' style='width: 780px; word-wrap: break-word;'> the data goes here..... </pre> ...

Arbitrary SQL Server Table to XHTML Table

I saw on a website, a guy had returned his database table information as an html table. It was pretty neat. His code is as follows: select 2 [@cellpadding] ,2 [@cellspacing] ,1 [@border] --This returns the header ,(select th from (select 'Database Table' th union all selec...

Drupal (FAPI) Creating a CRUD html table

Heya, I am creating a module, and am creating a function that creates a html table from one of my tables in the datasbase. function _createtable($tablename, $return = array()){ $html_table = ""; $query = 'SELECT * FROM {'.$tablename.'}'; $count = 10; $pager = pager_query($query, $count); $results = db_query($query); if (db_affect...

Why can I not set the width of the first column of the second row on this page?

For some reason I am unable to set and width properties of TD elements within this table, which are NOT on the first row. For example, in the linked example you can see I have tried to set the width of "Status" by using both the width attribute (set to 280) as well as inline CSS. Neither of these seem to work. Example: http://www.dnsde...

importing and mapping data from source file to HTML tables

Hi, php newbie here..I need some PHP help ideas/examples on how to import data from a delimited text file and map them into html tables. The data should populate and be mapped under its proper header. There are instances also where each record doesn't have all the values and if no data, then we can leave it null (See sample records). I w...

How to style table with only vertical cell spacing?

Hi, I have a table in my HTML yet I only want vertical spacing as it doesn't look right with the 25px horizontally. I can see no attribute in HTML to do this so is it possible? Thanks in Advance, Dean EDIT: I have a table with cellspacing all the way around of 25px. I would only like vertical cellspacing of 25px. ...

Can table in HTML have different amount of cells on different rows?

Or should the total amount of cells equal to columns*rows? A table with different amount of cells on different rows passes the W3 Validator. ...

jqGrid: Enable paging while converting HTML table to grid

Been googling all this while on how to convert an html table to something pagable and sortable, and I have stumbled across jqGrid jquery plugin. I've learned so far that we have to call tableToGrid() to convert the table (which we pass as a jquery selector string to the method). I've also tried a host of other things, like for e.g: tabl...

Which html element is semantically most appropriate for displaying a group of emails?

Hello. I have a group of emails (I hesitate to use the word list, as it may prejudice you answers), which I want to display in a tabular manner with columns of Subject, Content, Date, Action (whose value may contain a Delete button, for example). Semantically speaking, would you use a list (<dl>, probably) or a <table> for this data? My...

fix column width in table without fixed layout

I have a table without fixed layout, which means width of column depends on cell content. Now I need to fix width for one column. Say there is minimum width for this column even though all cells are empty. Or I can extend width for certain column. Plz advise if this is doable and how to do it. Thank you. ...

What is the fastest way to convert html table to php array ?

are there build in functions in latest versions of php specially designed to aid in this task ? ...

jqgird: problems paging from an existing table

I had started another post wanting to know how to use jqgrid when you are converting a html table to grid. I've got that working. However the data is not paged. It converts table to grid, displays the pager controls and all; however it shows page 1 of 0. The data is paged only when I select a different page size from the drop-down. Why...

How to get a row's width to fit to the width of the other rows in a table? (html)

In the following table, the first cell content is dynamically generated. The long text in the second cell causes the table width to grow beyond what is needed to fit the first cell. How can I get the bottom cell to wrap to another row, instead of widening the table? I can't use a fixed width for the second cell, because the first cell ...

HTML fit page to screen problems

I'm developing an application for measuring and storing running/cycling tracks using OSM/Google Maps integration. I want it to work without any page scrolling, so the page should fill the browser window. Basically it should look as follows: +---------------------------------+ | Toolbar with some buttons | +---------+-------------...

How to get rid of the selection box around my selection

Howdy, I'm trying to create a website for myself and just ran into this issue: As you can see there is some kind of selection visible in both images which I don't want to be displayed. The first image is taken after I clicked the menu item. The second image is taken after the first when I additionally move the mouse over it. These ...

TD elements word wrapping on shrinking browser window

I have a table who's columns contain two inline divs, one displaying an image, and the other display text, side by side. So each td is rectangular with an image on the right and text beside it on the left (on a single line). The problem (which happens in all browsers) is when I shrink the horizontal browser size, rather than keeping th...