css-tables

HTML email - TD hover to change back background-color not working

青春壹個敷衍的年華 提交于 2019-12-11 13:25:49
问题 My codepen: http://codepen.io/leongaban/pen/iJBrn Note this isn't for a regular webpage, I'm building an HTML email, however for modern browsers / email clients it would be nice to have a simple rollover color (no javascript). Not sure why my hover isn't work. I'm using code found from the other TD hover stackoverflow questions I've found so far. td.blue-button:hover { background-color: #267aa6; } How would you create this? 回答1: You inline style is taking precedence over the external td.blue

Multi Row Tables Always Vertically Center Content

别说谁变了你拦得住时间么 提交于 2019-12-11 12:23:12
问题 I've basically got a table with 2 rows and it looks like this: --------- | | | | | | | | | |-------- My problem is that the second row auto centers vertically like this: |hey| | |hey|hey| |hey| | |-------- How so right now I'm adding paragraphs until it just becomes the size of the other: |hey|hey| |hey| | |hey| | |-------- How can I do this correctly using CSS? 回答1: I think this is what you're looking for: <table> <tr> <td>Some content<br />More content<br />More content</td> <td style=

Work around to make table-cell CSS render properly in IE6/7?

半世苍凉 提交于 2019-12-11 10:35:40
问题 My site is showing up fine in IE8/Firefox/Chrome but I can't figure out how to make it function with IE. The relevant CSS: #maincontent { display: table; } #content { display: table-cell; width: 620px; padding-left:4%; padding-right: 22px; padding-bottom:15px; } #sidebar { display: table-cell; width: 300px; } #content and #sidebar are in #maincontent . On IE6/7 #sidebar will be under #content . I've tried setting the sidebar to display:block with a float , and it will then render fine in IE6

How to make aside column grow with the size of the content in parallel column

故事扮演 提交于 2019-12-11 10:27:39
问题 Hi how can I make the side menu to grow with the content of the parallel container, that should expand with its content as well. I am trying to ensure that the left column enclosed in aside tag, is the same size as the content on the right enclosed in div column .right_panel . I was able to accomplish this by setting the size of html and body tag as well as .wrapper class to height: 100% as per similar queries on stackoverflow. However now the .wrapper is not expanding when I add more content

Is there a way to “skip” unnecessary elements in a nesting structure when using CSS display:table?

偶尔善良 提交于 2019-12-11 10:19:27
问题 I have a structure similar to this: <div style="display:table"> <div class="unnecessary element"> <div class="unnecessary element"> <ul style="display:table-row"> <li style="display:table-cell">Hello everybody.</li> <li style="display:table-cell">This is an example</li> <li style="display:table-cell">of a recurring structure</li> </ul> </div> </div> <div class="unnecessary element"> <div class="unnecessary element"> <ul style="display:table-row"> <li style="display:table-cell">that has some

zebra (even/odd) rows css in <ul> and hyperlink issue

若如初见. 提交于 2019-12-11 07:48:29
问题 I have this little select code which should provide a 'zebra' even/odd rows. I don't understand how to change the css for that: 1, every other that will be listed (and not every second) should have .even css 2, if one of them clicked should be bold as well (I could not figure out, how to merge these two issue) Any help would be appreciated, from a beginner. <div id="left"> <?php $query = $pdo->prepare('SELECT id, name FROM test1 ORDER BY name ASC'); $query->execute(); ?> <ul> <?php foreach (

How to stylize recursive directory with css?

三世轮回 提交于 2019-12-11 07:32:05
问题 I'm trying to make a recursive directory display in html using json data from a node.js server and using it as the rendering context for a dustjs-linkedin template. The data contains a structure like the following: { "isDirectory": true, "path": "", "name": "", "files": [ { "name": "Light House.jpg", "filename": "Light%20House.jpg", "path": "/Light%20House.jpg", "bytes": 561276, "date": "2012-07-25T16:30:45.094Z", "prettyDate": "Jul 25 2012 11:30:45", "type": "image/jpeg", "size": "548.1 kB",

Responsive scroll background issue

北战南征 提交于 2019-12-11 05:29:50
问题 I have the following CSS, trying to make a responsive table-like design. .table { display: flex; width: 100%; flex-direction: column; overflow-x: auto; } .table__row { display: flex; flex-flow: row nowrap; } .table__column { flex-shrink: 0; display: block; align-items: center; padding: .54rem 1.05rem; width: 300px; overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; } Here's a JSFiddle: https://jsfiddle.net/abuer473/ The problem is that when a user scrolls to the right, the

Overlay on table cell on hover of first cell

夙愿已清 提交于 2019-12-11 04:49:37
问题 I have create a table listing. When user hover the first cell that is with 3 dots Edit and Delete option are displayed and below that there is a transparent background. Everything is fine when content is in single line. Issue is when there is more content. The height of overlay does not adjust. I have tried top: 0; bottom: 0; height: 100% to the .action it covers the whole table. body { margin: 0 } .table { display: table; width: 100%; border-bottom: 1px solid #ccc } .tHead, .tRow { display:

Combining fixed and variable width columns in one table

戏子无情 提交于 2019-12-11 04:17:01
问题 How can I create a table with CSS like the following (the first three columns with a fixed width in px and the following columns with a width in %): I know how I can create a column with variable or fixed width. 回答1: Nest another table for the 4 columns on the right. The HTML structure would look like: <table class = "big first"> <tr> <td class = "px10">Cell1</td> <td class = "px20">Cell2</td> <td class = "px30">Cell3</td> <td> <table class = "big"> <td>1</td><td>2</td><td>3</td><td>4</td> <