Everybody knows how a dropdown menu works where a person clicks on the drop down menu and it displays a drop down list where the user can select an option from the list. What I want to know is that is there a way in html where except displaying a dropdown list can I display a grid instead with the options in the grid? I havn't got any code for this but if anyone knows this is possible and can provide an example of this I would be very greatful and it would be very helpful.
Here's a basic example:
http://jsfiddle.net/QmLmC/
<!-- HTML -->
<div id="myDropdownGrid" class="dropdownGrid">
<div>
<button type="button">Open/Close</button>
</div>
<table border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
<p>Click the button above to view open or close the grid.</p>
.
/* CSS */
.dropdownGrid{position:relative;}
.dropdownGrid table{position:absolute; z-index:999; display:none;}
.dropdownGrid td{width:20px; height:20px; background-color:white;}
.dropdownGrid td:hover{background-color:blue;}
.
// Javascript using jQuery
$("#myDropdownGrid button").click( function(){
$('#myDropdownGrid table').toggle();
});
... well, there's no such thing as a 'grid' but a table would present the info in 'grid' form. You could build a grid out of div elements, but that can get unduly tedious.
Feel like using jQuery for this?
/* make button clickable */
$("#someButton").click( function(){
/* grid like container of data, talbe or a complex div 'structure' */
$("#someGrid").toggle() // if grid is visible hide it, if hidden show it
})
... so you'd have a button with an id of "someButton" and whatever grid structure/wrapper with id id of "someGrid" and css of "display:none" on it.
Related
On the left, I have buttons and the rest of the screen is a table, and I need a vertical line to act as a separator between the two but without any use of CSS/styles/classes.
Here is the base code:
<section align="left">
<div id="buttons">
<button type="button">Fire</button>
<br>
<button type="button">Water</button>
</div>
</section>
<!-- NEED A VERTICAL LINE HERE -->
<section align="center">
<table id="pokemons">
<tr>
<td>
<h5>Charizard</h5>
</td>
<td>
<h5>Blastoise</h5>
</td>
</tr>
<br>
<tr>
<td>
<h5>Pikachu</h5>
</td>
<td>
<h5>Squirttle</h5>
</td>
</tr>
</table>
</section>
I currently have this (for some reason in online editors the table isn't aligned to the middle, but on my local code it's fine):
I need this:
If you want to avoid using CSS, then your page will look atrocious.
There is not really a way to do that. I would make an <hr> tag and use transform: rotate(90); in your CSS.
I'm sorry but you will have to use CSS. No way around it, unless you use CSS or JavaScript.
On this webpage when you click on a link in the Acoustid column it doesn't change colour to show it has been visited
http://reports.albunack.net/acoustid_report.html
I cant see wny, there is nothing special in the html
<tr>
<td>
<a href="http://acoustid.org/track/1eb887d3-5c75-4533-b508-7c17a118b07b" target="_blank" title="Acoustid Page">
1eb887d3-5c75-4533-b508-7c17a118b07b
</a>
</td>
<td>
Nelly Furtado/my love grows deeper
</td>
<td>
5
</td>
<td>
Nelly Furtado/maneater
</td>
<td>
1
</td>
</tr>
<tr>
<td>
<a href="http://acoustid.org/track/123feaa4-2464-495c-bb76-d4dad91ffca3" target="_blank" title="Acoustid Page">
123feaa4-2464-495c-bb76-d4dad91ffca3
</a>
</td>
<td>
Nelly Furtado/on the radio
</td>
<td>
69
</td>
<td>
Nelly Furtado/....on the radio (remember the days)
</td>
<td>
1
</td>
</tr>
and I cant see anything in the css either
Use CSS
a:visited {
color: red; // #565656 hex code for any other color in place of red
}
Change red to any color of your choice eg. #ff0000 for any other color code
For the links to change color when they have been visted you will have to specify it in your css document . For example you hv to specifie what should happen when the link is not visited , visited and when its active. Note that if u dont specifie these there it automatically fall under defualt setting to which may vary based on the browser
https://jsfiddle.net/therbq0h/
this link provides something similar to is being displays, its not formatted but it gives 2 pages. Has to be printed in IE.
I have a page that stores data in a database and a separate page that displays its in a generic way. I am creating custom pages to exactly match word documents, the way all the documents were created before. The page has a header, body, footer.
I need print to look like:
Page 1
------------Header-------------
------------Body---------------
Partial Data pulled from database entered in a form
------------footer-------------
Page 2
------------Body---------------
Partial Data pulled from database entered in a form
Page 3
------------Body---------------
remaining Data pulled from database entered in a form
data is dynamic in size.
Currently thead and tbody works fine, but i need footer on page 1 only with a horizontal line at the top.
<body>
<div class="wrapper_class" >
<div>
<table style="width:100%;font-size:8pt;">
<thead>
<tr>
<td style="width:33%;">
Customer names:
</td>
<td style="width:33%;">
<img src="" />
</td>
<td style="width:33%;">
Customer names:
</td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td>
some more rows and columns
</td>
</tr>
</table>
</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">
<div class="floatCenterParent">
<p><%SELECT MemoField FROM Table WHERE ID = 100%></p>
</div>
<div>
<p><%SELECT MemoField FROM Table WHERE ID = 101%></p>
</div>
<div style="some more styling">
more text
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
static text
</td>
</tr>
</tfoot>
</table>
</div>
<div class="floating_Menu">
buttons that dont get printed
</div>
</div>
</body>
page layout matches the word document, I need the footer on page 1 only, and must be at the bottom even if there isn't a full page. Only needs to print correctly in IE10+. If possible cross-browser would be nice.
The footer does display correctly on every page at the bottom except for the last page, it follows right after the body text.
.footer { display: none; }
.page-one > .footer { display: block; }
I am trying to use table element to align text to print to A4 page using the plain HTML i got perfect alignment which prints perfectly in a paper but when printing another name td is resized and i lose paper alignment as i have tapleted paper with fields like name already printed so i need right aligment so it would print in the same section on the paper.
any solution for this?
<table width = 100% border =1>
<tr>
<td> </td>
<td> </td>
<td align = "right"><my><?php echo $name;?></my></td>
<td> </td>
<td> </td>
<td> </td>
<td align = "center"><my><?php echo $rollno;?></my></td>
<td> </td>
<td> </td>
</tr></table>
You can set table-layout: fixed property for table element and width: ? (where ? stands for the width value you want to provide) for your td element.
By the way, html attribute value should be always enclosed with quotes, for example: border="1".
I have a small problem. I've got table like this
<table border="1">
<tr style="position:relative;">
<td>
Click here to redirect yourself
<span onclick="ajax_redir();" style="position:absolute;right:5px;">
AJAX
</span>
</td>
</tr>
</table>
my problem is that AJAX is placed in the right corner of my screen. What am I doing wrong?
(I am trying to make AJAX text in corner of actual
<td></td>)
demo of my problem http://jsfiddle.net/ehtwW/
It is actually kind of strange, but it seems that if you wrap all the contents of the td in a div it will work.
Just like this: http://jsfiddle.net/Gm5fg/1/
The TD has to be relatively positioned. For the TR it is not necessary:
<table border="1">
<tr>
<td style="position:relative;">
Click here to redirect yourself
<span onclick="ajax_redir();" style="position:absolute;right:5px;">
AJAX
</span>
</td>
</tr>
</table>