Avko |
21.03.2018 14: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 15: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 17:05 |
Predmet:Re: Kako razvuci dugme na cijelu celiju table
PreuzmiIzvorni kôd (HTML):
.button {
background-color: #4CAF50;
border: none;
color: white;
width: 100%;
hight: 50%;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
table td form button{
width: 100%;
height: 100%;
}
<table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td><a href="proba.html" target="main" class="button">PROBA </a></td></tr>
<tr><td><a href="about.html" target="main" class="button">ABOUT </a></td></tr>
<tr><td><a href="courses.html" target="main" class="button">COURSES </a></td></tr>
<tr><td><a href="department.html" target="main" class="button">DEPARTMENT </a></td></tr>
<tr><td><a href="contact.html" target="main" class="button">CONTACT US </a></td></tr>
<tr><td class="button"><a href="proba.html" target="main" >zxz </a></td></tr>
<form action="proba.html" target="main" method="get">
<!-- First name: <input type="text" name="fname"><br> -->
<!-- Last name: <input type="text" name="lname"><br> -->
<!-- <button type="submit" formtarget="_blank">Submit to a new window</button> -->
nece
|
zxz |
21.03.2018 17: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 19:28 |
Predmet:Re: Kako razvuci dugme na cijelu celiju table
je stavio sam na krivo mjesto.
![](https://abload.de/img/buttoncellss9qwk.jpg)
No pojavio se novi problem, Morat cu sa formom jer zelim poslati neke varijable na tu drugu stranu, moja proba nije kao ono tvoje
![](https://abload.de/img/buttoncellstcoly.jpg)
ustvari svasta sam napisao pod style, a nisam bas u tome da se snalazim. evo i kod:
PreuzmiIzvorni kôd (HTML):
table {
width: 100%;
height: 100%;
border: 10;
cellspacing: 0;
cellpadding: 0;
}
.width-20 td {
width: 20%;
}
.width-25 td {
width: 50%;
}
.buttons {
text-align: center;
font-size: 1.0em;
font-weight: bold;
line-height: 200%;
}
.buttons a {
display: inline-block;
height: 100%;
width: 100%;
margin-bottom: 0.5em;
padding-top: .6em;
padding-bottom: .6em;
color: #fff;
background-color: #aaabbb;
border-radius: 5px;
border: solid #cccccc 1px;
box-shadow: 2px 2px 1px #888888;
}
.buttons a:active {
box-shadow: 1px 1px 0px #888888;
}
.buttons form button{
display: inline-block;
height: 100%;
width: 100%;
margin-bottom: 0.5em;
padding-top: .6em;
padding-bottom: .6em;
color: #fff;
background-color: #aaabbb;
border-radius: 5px;
border: solid #cccccc 1px;
box-shadow: 2px 2px 1px #888888;
}
<table class="buttons width-25">
<tr><td class="button"><a href="proba.html" target="main" >ZXZ </a></td></tr>
<tr><td><a href="proba.html" target="main" class="button">PROBA </a></td></tr>
<tr><td><a href="about.html" target="main" class="button">ABOUT </a></td></tr>
<tr><td><a href="courses.html" target="main" class="button">COURSES </a></td></tr>
<tr><td><a href="department.html" target="main" class="button">DEPARTMENT </a></td></tr>
<tr><td><a href="contact.html" target="main" class="button">CONTACT US </a></td></tr>
<form class="buttons width-25" action="proba.html" target="main" method="POST">
<!-- First name: <input type="text" name="fname"><br> -->
<!-- Last name: <input type="text" name="lname"><br> -->
<input type="hidden" name="varname" value="12345" />
<!-- <button type="submit" formtarget="_blank">Submit to a new window</button> -->
|
zxz |
21.03.2018 23:21 |
Predmet:Re: Kako razvuci dugme na cijelu celiju table
.buttons a
to je tvoj za ovj tater. |
Avko |
22.03.2018 16: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
![](https://abload.de/img/buttonnro4o.jpg)
evo i kod:
PreuzmiIzvorni kôd (HTML):
table {
width: 100%;
height: 100%;
border: 10;
background-color: #1fd100;
cellspacing: 0;
cellpadding: 0;
}
.width-25 td {
width: 100%;
}
/** ovo sam dodao **/
.buttons{
text-align: center;
font-size: 1.0em;
font-weight: bold;
line-height: 0;
}
button{
margin-top: 0;
margin-bottom: 0;
padding-top: 50%;
padding-bottom: 50%;
color: #000;
background-color: #1fd100;
border-radius: 0;
border: solid #cccccc 1px;
box-shadow: 2px 2px 1px #888888;
}
<table class="buttons width-25" border="10">
<form action="button_1.php" target="main" method="POST">
<input type="hidden" name="korisnik" value="12345" />
<form action="button_2.php" target="main" method="POST">
<input type="hidden" name="korisnik" value="12345" />
Ima li tko? |
zxz |
22.03.2018 17:31 |
Predmet:Re: Kako razvuci dugme na cijelu celiju table
Probaj ovako:
Upotrijebi klasu
PreuzmiIzvorni kôd (HTML):
table {
width: 100%;
height: 100%;
border: 10;
background-color: #1fd100;
cellspacing: 0;
cellpadding: 0;
}
.width-25 td {
width: 100%;
}
/** ovo sam dodao **/
.buttons{
text-align: center;
font-size: 1.0em;
font-weight: bold;
line-height: 0;
}
.button{
margin-top: 0;
margin-bottom: 0;
width: 400px;
height: 100px;
padding-bottom: 50%;
color: #000;
background-color: #1fd100;
border-radius: 0;
border: solid #cccccc 1px;
box-shadow: 2px 2px 1px #888888;
}
<table class="buttons width-25" border="10">
<form target="main" method="POST">
<input type="hidden" name="korisnik" value="12345" />
<form action="button_2.php" target="main" method="POST">
<input type="hidden" name="korisnik" value="12345" />
|
Avko |
22.03.2018 17: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 17:57 |
Predmet:Re: Kako razvuci dugme na cijelu celiju table
na main frame se ucita dobro, dok na ovom ljevo nije dobro
|