Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190

Warning: Illegal string offset 'status' in /home2/icentarb/public_html/icentar/print.php on line 190
iCentar » Racunari i oprema » Programirannje i baze podataka » Html/CSS » Kako razvuci dugme na cijelu celiju table
Avko 21.03.2018 13:50
Predmet:Kako razvuci dugme na cijelu celiju table

imamo button i stavimo ga u jednu celiju table , ali kako ga razvuci na cijelu tablu?

Prilozi:
proba.rar (Velicina datoteke:2.30 KB)

zxz 21.03.2018 14:45
Predmet:Re: Kako razvuci dugme na cijelu celiju table

da nisi mislio ovako
<tr><td class="button"><a href="proba.html" target="main" >PROBA</a></td></tr>

Avko 21.03.2018 16:05
Predmet:Re: Kako razvuci dugme na cijelu celiju table

PreuzmiIzvorni kôd (HTML):
  1. <title>nav</title>
  2. .button {
  3.     background-color: #4CAF50;
  4.     border: none;
  5.     color: white;
  6.     width: 100%;
  7.         hight: 50%;
  8.     text-align: center;
  9.     text-decoration: none;
  10.     display: inline-block;
  11.     font-size: 16px;
  12.     margin: 4px 2px;
  13.     cursor: pointer;
  14. }
  15. table td form button{
  16.   width: 100%;
  17.   height: 100%;
  18. }
  19. </head>
  20.  
  21. <table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0">
  22.  
  23. <tr><td></td></tr> <!-- kolona -->
  24. <tr><td><a href="proba.html" target="main" class="button">PROBA</a></td></tr>
  25. <tr><td><a href="about.html" target="main" class="button">ABOUT</a></td></tr>
  26. <tr><td><a href="courses.html" target="main" class="button">COURSES</a></td></tr>
  27. <tr><td><a href="department.html" target="main" class="button">DEPARTMENT</a></td></tr>
  28. <tr><td>Gallery</td></tr>
  29. <tr><td><a href="contact.html" target="main" class="button">CONTACT US</a></td></tr>
  30. <tr><td class="button"><a href="proba.html" target="main" >zxz</a></td></tr>
  31. <tr><td>
  32.         <form action="proba.html" target="main" method="get">
  33.                 <!-- First name: <input type="text" name="fname"><br> -->
  34.                 <!-- Last name: <input type="text" name="lname"><br> -->
  35.                 <button type="submit" >PROBA</button>
  36.                 <!-- <button type="submit" formtarget="_blank">Submit to a new window</button> -->
  37.         </form>
  38. </td></tr>
  39. </body>
  40. </html>

nece


zxz 21.03.2018 16:54
Predmet:Re: Kako razvuci dugme na cijelu celiju table

Nemoze biti.
Mozda nisi napravio refresh sa f5.
Upravo je tako kako si objasnio.
<tr><td class="button"><a href="proba.html" target="main" >PROBA</a></td></tr>

vidis da je cijela kao klasa.

Avko 21.03.2018 18:28
Predmet:Re: Kako razvuci dugme na cijelu celiju table

je stavio sam na krivo mjesto.



No pojavio se novi problem, Morat cu sa formom jer zelim poslati neke varijable na tu drugu stranu, moja proba nije kao ono tvoje



ustvari svasta sam napisao pod style, a nisam bas u tome da se snalazim. evo i kod:

PreuzmiIzvorni kôd (HTML):
  1.  
  2. <title>nav</title>
  3. table {
  4.         width: 100%;
  5.                 height: 100%;
  6.                 border: 10;
  7.                 cellspacing: 0;
  8.                 cellpadding: 0;
  9.     }
  10.  
  11.     .width-20 td {
  12.         width: 20%;
  13.     }
  14.  
  15.     .width-25 td {
  16.         width: 50%;
  17.     }
  18.  
  19.     .buttons {
  20.         text-align: center;
  21.         font-size: 1.0em;
  22.         font-weight: bold;
  23.         line-height: 200%;
  24.     }
  25.     .buttons a {
  26.         display: inline-block;
  27.         height: 100%;
  28.         width: 100%;
  29.         margin-bottom: 0.5em;
  30.         padding-top: .6em;
  31.         padding-bottom: .6em;
  32.         color: #fff;
  33.         background-color: #aaabbb;
  34.         border-radius: 5px;
  35.         border: solid #cccccc 1px;
  36.         box-shadow: 2px 2px 1px #888888;
  37.     }
  38.     .buttons a:active {
  39.         box-shadow: 1px 1px 0px #888888;
  40.     }
  41.         .buttons form button{
  42.         display: inline-block;
  43.         height: 100%;
  44.         width: 100%;
  45.         margin-bottom: 0.5em;
  46.         padding-top: .6em;
  47.         padding-bottom: .6em;
  48.         color: #fff;
  49.         background-color: #aaabbb;
  50.         border-radius: 5px;
  51.         border: solid #cccccc 1px;
  52.         box-shadow: 2px 2px 1px #888888;
  53.     }
  54. </head>
  55.  
  56.  
  57. <table class="buttons width-25">
  58.  
  59. <tr><td></td></tr> <!-- kolona -->
  60.  
  61. <tr><td class="button"><a href="proba.html" target="main" >ZXZ</a></td></tr>
  62.  
  63. <tr><td><a href="proba.html" target="main" class="button">PROBA</a></td></tr>
  64.  
  65. <tr><td><a href="about.html" target="main" class="button">ABOUT</a></td></tr>
  66.  
  67. <tr><td><a href="courses.html" target="main" class="button">COURSES</a></td></tr>
  68.  
  69. <tr><td><a href="department.html" target="main" class="button">DEPARTMENT</a></td></tr>
  70.  
  71. <tr><td><a href="contact.html" target="main" class="button">CONTACT US</a></td></tr>
  72.  
  73. <tr><td>
  74.         <form class="buttons width-25" action="proba.html" target="main" method="POST">
  75.                 <!-- First name: <input type="text" name="fname"><br> -->
  76.                 <!-- Last name: <input type="text" name="lname"><br> -->
  77.                 <input type="hidden" name="varname" value="12345" />
  78.                 <button type="submit">PROBA</button>
  79.                 <!-- <button type="submit" formtarget="_blank">Submit to a new window</button> -->
  80.         </form>
  81. </td></tr>
  82. </body>
  83. </html>

zxz 21.03.2018 22:21
Predmet:Re: Kako razvuci dugme na cijelu celiju table

.buttons a
to je tvoj za ovj tater.

Avko 22.03.2018 15:03
Predmet:Re: Kako razvuci dugme na cijelu celiju table

evo izludio sam više, nemogu pa nemogu ga razvuci a neznam dali je to i moguce. Procitao preko 100 stranica interneta od jue do danas



evo i kod:

PreuzmiIzvorni kôd (HTML):
  1. </head>
  2.         table {
  3.         width: 100%;
  4.                 height: 100%;
  5.                 border: 10;
  6.                 background-color: #1fd100;
  7.                 cellspacing: 0;
  8.                 cellpadding: 0;
  9.     }
  10.    
  11.         .width-25 td {
  12.         width: 100%;
  13.     }
  14.    
  15.     /** ovo sam dodao **/
  16.     .buttons{
  17.         text-align: center;
  18.         font-size: 1.0em;
  19.         font-weight: bold;
  20.         line-height: 0;
  21.     }
  22.     button{
  23.         margin-top: 0;
  24.         margin-bottom: 0;
  25.         padding-top: 50%;
  26.         padding-bottom: 50%;
  27.         color: #000;
  28.         background-color: #1fd100;
  29.         border-radius: 0;
  30.         border: solid #cccccc 1px;
  31.         box-shadow: 2px 2px 1px #888888;
  32.     }
  33.    
  34.    
  35.  
  36.  
  37. <table class="buttons width-25" border="10">
  38.  
  39. <tr><td>
  40.         <form action="button_1.php" target="main" method="POST">
  41.                 <input type="hidden" name="korisnik" value="12345" />
  42.                 <button type="submit">BUTTON 1</button>
  43.         </form>
  44. </td></tr>
  45.  
  46. <tr><td>
  47.         <form action="button_2.php" target="main" method="POST">
  48.                 <input type="hidden" name="korisnik" value="12345" />
  49.                 <button type="submit">BUTTON 2</button>
  50.         </form>
  51. </td></tr>
  52.  
  53. </body>
  54. </html>

Ima li tko?

zxz 22.03.2018 16:31
Predmet:Re: Kako razvuci dugme na cijelu celiju table

Probaj ovako:
Upotrijebi klasu
PreuzmiIzvorni kôd (HTML):
  1. </head>
  2.         table {
  3.         width: 100%;
  4.                 height: 100%;
  5.                 border: 10;
  6.                 background-color: #1fd100;
  7.                 cellspacing: 0;
  8.                 cellpadding: 0;
  9.     }
  10.  
  11.         .width-25 td {
  12.         width: 100%;
  13.     }
  14.  
  15.     /** ovo sam dodao **/
  16.     .buttons{
  17.         text-align: center;
  18.         font-size: 1.0em;
  19.         font-weight: bold;
  20.         line-height: 0;
  21.     }
  22.  .button{
  23.         margin-top: 0;
  24.         margin-bottom: 0;
  25.         width: 400px;
  26.         height: 100px;
  27.         padding-bottom: 50%;
  28.         color: #000;
  29.         background-color: #1fd100;
  30.         border-radius: 0;
  31.         border: solid #cccccc 1px;
  32.         box-shadow: 2px 2px 1px #888888;
  33.     }
  34.  
  35.  
  36.  
  37.  
  38. <table class="buttons width-25" border="10">
  39.  
  40. <tr><td>
  41.         <form  target="main" method="POST">
  42.                 <input type="hidden" name="korisnik" value="12345" />
  43.                 <button type="submit" class=button>BUTTON 1</button>
  44.         </form>
  45. </td></tr>
  46.  
  47. <tr><td>
  48.         <form action="button_2.php" target="main" method="POST">
  49.                 <input type="hidden" name="korisnik" value="12345" />
  50.                 <button type="submit">BUTTON 2</button>
  51.         </form>
  52. </td></tr>
  53.  
  54. </body>
  55. </html>

Avko 22.03.2018 16:51
Predmet:Re: Kako razvuci dugme na cijelu celiju table

sa ovime

...

width: 400px;
height: 100px;

odu buttoni van,

a mislim treba biti <button type="submit" class="button">BUTTON 1</button>
navodnici na button

Avko 22.03.2018 16:57
Predmet:Re: Kako razvuci dugme na cijelu celiju table

na main frame se ucita dobro, dok na ovom ljevo nije dobro