FAQ Autentificare
Cautare Profil
Membri Grupuri
Mesaje private
Inregistrare
Css 5 padding height width
Creaza un subiect nou   Raspunde la subiect
Pagina de start a forumului  » Despre limbajele de programare  » Css 5 padding height width
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
Admin
Administrator
Administrator


Data inscrierii: 07/Dec/2013
Mesaje: 44

 Mesaj Trimis: 22/01/2017 18:47    Titlul subiectului: Css 5 padding height width
Raspunde cu citat (quote)

Citat:
Padding

Lasa un spatiu intre continut si border. In general e mai estetic sa fie lasat un spatiu intre text si bordura din jurul lui. Se poate insa aplica la mai multe elemente imagini, link-uri, tabele, liste etc.

Toate proprietatile intr-o singura declaratie:

<html>
<head>
<style>
td.test1 {padding: 1.5cm}
td.test2 {padding: 0.5cm 2.5cm}
</style>
</head>

<body>
<table>
<tr>
<td>
This is a tablecell with equal padding on each side.
</td>
</tr>
</table>

<table>
<tr>
<td>
This tablecell has a top and bottom padding of 0.5cm and a left and right padding of 2.5cm.
</td>
</tr>
</table>
</body>
</html>

Setarea padding-ului superior întrebuințând procentul

<html>
<head>
<style>
td
{
padding-top: 10%
}
</style>
</head>
<body>

<table>
<tr>
<td>
This is a tablecell with a top padding
</td>
</tr>
</table>

</body>
</html>
Padding
Lasa un spatiu intre continut si border. In general e mai estetic sa fie lasat un spatiu intre text si bordura din jurul lui. Se poate insa aplica la mai multe elemente imagini, link-uri, tabele, liste etc.

Toate proprietatile intr-o singura declaratie:

<html>
<head>
<style>
td.test1 {padding: 1.5cm}
td.test2 {padding: 0.5cm 2.5cm}
</style>
</head>

<body>
<table>
<tr>
<td>
This is a tablecell with equal padding on each side.
</td>
</tr>
</table>

<table>
<tr>
<td>
This tablecell has a top and bottom padding of 0.5cm and a left and right padding of 2.5cm.
</td>
</tr>
</table>
</body>
</html>

Setarea padding-ului superior folosind procentul

<html>
<head>
<style>
td
{
padding-top: 10%
}
</style>
</head>
<body>

<table>
<tr>
<td>
This is a tablecell with a top padding
</td>
</tr>
</table>
</body>
</html>

Setarea padding-ului din dreapta

<html>
<head>
<style>
td {padding-right: 5cm}
</style>
</head>

<body>
<table>
<tr>
<td>
This is a tablecell with a right padding. This is a tablecell with a right padding.
</td>
</tr>
</table>
</body>
</html>

Proprietatile sunt:

padding
padding-top, padding-right, padding-bottom, padding-left

Inaltimea si latimea

height,width

Setarea inaltimii utilizând pixeli


<html>
<head>
<style>
img.normal
{
height: auto
}
img.big
{
height: 160px
}
img.small
{
height: 30px
}
</style>
</head>
<body>

<img class="normal" src="logocss.gif" width="95" height="84">

<img class="big" src="logocss.gif" width="95" height="84">

<img class="small" src="logocss.gif" width="95" height="84">

</body>
</html>

Setarea latimii folosind procent

<html>
<head>
<style>
img
{
width: 50%
}
</style>
</head>
<body>

<img src="logocss.gif" width="95" height="84">

</body>
</html>
</body>
</html>

Proprietatile


min-heigth, min-width
nu au efectul scontat in anumite browsere, deci trebuie utilizate cu atentie
 Sus »
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Pagina de start a forumului  » Despre limbajele de programare  » Css 5 padding height width
Creaza un subiect nou   Raspunde la subiect Ora este GMT + 2 ore
Pagina 1 din 1

 
Mergi direct la:  
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum



Powered by phpBB © 2001, 2002 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro