Autor Subiect: Imagine fundal  (Citit de 1681 ori)

0 Utilizatori şi 1 Vizitator pe acest subiect.

Deconectat Ella

  • Newbie
  • *
  • Mesaje: 5
  • Popularitate: +0/-0
Imagine fundal
« : Joi 25 Februarie 2010, 22:14:25 »
In primul rand scuze pentru dublu-post. O sa postez intrebarea tot aici, ca sa nu mai deschid alt topic, sper ca nu e o problema ^^"

Deci, eu as vrea sa pun o imagine ca fundal, dar aceasta sa nu se repete, ci sa apara o singura data. Am gasit cum sa fac chestia asta, dar problema e ca imaginea apare doar intr-un colt. Ce ar trebui sa-i mai adaug in cod pentru a mari automat imaginea astfel incat sa acopere tot ecranul?

Secventa din cod:

body
{
             background-image: url('http://i284.photobucket.com/albums/ll6/vge_2008/padure4.jpg');
             background-repeat: no-repeat;
             margin: 0px;
             padding: 12px 30px 4px 30px;
}

SMF România

Imagine fundal
« : Joi 25 Februarie 2010, 22:14:25 »

Deconectat -=[Vyorel]=-

  • SMF Free Helper
  • Administrator
  • Hero Member
  • *****
  • Mesaje: 1.036
  • Popularitate: +44/-4
  • Gen: Bărbat
  • I LOVE SMF
    • Xerom Zone Community
  • SMF Version: SMF 2.0.2
Re: Imagine fundal
« Răspunde #1 : Joi 25 Februarie 2010, 22:33:13 »
Nu sunt sigur, dar incercarea moarte n-are.

Urca imaginea pe server in directoriul cu tema de la forum iar codul ar trebui sa fie ceva de genul:

body
{
    background-image: url('/themes/tema ta/images/padure4.jpg');
    background-repeat: no-repeat;
    margin: 0px;
    padding: 12px 30px 4px 30px;
}

Imaginea aia o poti pune unde vrei, nu neaparat unde ti-am zis mai sus, dar sa scrii directoriul corect.


Deconectat Ella

  • Newbie
  • *
  • Mesaje: 5
  • Popularitate: +0/-0
Re: Imagine fundal
« Răspunde #2 : Vineri 26 Februarie 2010, 10:17:08 »
Stiu ca e o intrebare stupida, dar .... unde sa incarc imaginea? Adica pe ce server?  Ca eu am luat tema 'green' oferita de smf in pa, la Themes and Layout si i-am editat css-ul de jos, punand imaginea ca fundal. I-am dat sa nu o repete ci sa o afiseze o singura data. Eh, pana aici totul bine, doar ca imaginea nu se mareste automat ca sa acopere forumul ci ramane sus, mica.

Mai exact, asa:

http://testetaraduncanromania.smfforfree.com/index.php

CSS-ul complet:


/* Normal, standard links. */
a:link
{
color: #4f714b;
text-decoration: none;
}
a:visited
{
color: #4f714b;
text-decoration: none;
}
a:hover
{
text-decoration: underline;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited
{
color: #000000;
text-decoration: none;
}
a.nav:hover
{
color: #cc3333;
text-decoration: underline;
}

/* Tables should show empty cells. */
table
{
empty-cells: show;
}

/* By default (td, body..) use verdana in black. */
body, td, th , tr
{
color: #000000;
font-size: small;
font-family: verdana, sans-serif;
}

/* The main body of the entire forum. */
body
{
background-image: url('http://i284.photobucket.com/albums/ll6/vge_2008/padure4.jpg');   
             background-repeat: no-repeat;   
             margin: 0px;   
             padding: 12px 30px 4px 30px;}
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
color: #000000;
font-family: verdana, sans-serif;
}
input, button
{
font-size: 90%;
}

textarea
{
font-size: 100%;
color: #000000;
font-family: verdana, sans-serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check
{
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
font-size: 90%;
font-weight: normal;
color: #000000;
font-family: verdana, sans-serif;
}

/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
height: 1px;
border: 0;
color: #666666;
background-color: #666666;
}

/* No image should have a border when linked */
a img{
border: 0;
}
/* A quote, perhaps from another post. */
.quote
{
color: #000000;
background-color: #D7DAEC;
border: 1px solid #000000;
margin: 1px;
padding: 1px;
font-size: x-small;
line-height: 1.4em;
}

/* A code block - maybe even PHP ;). */
.code
{
color: #000000;
background-color: #dddddd;
font-family: "courier new", "times new roman", monospace;
font-size: x-small;
line-height: 1.3em;
/* Put a nice border around it. */
border: 1px solid #000000;
margin: 1px auto 1px auto;
padding: 1px;
width: 99%;
/* Don't wrap its contents, and show scrollbars. */
white-space: nowrap;
overflow: auto;
/* Stop after about 24 lines, and just show a scrollbar. */
max-height: 24em;
}

.geshi
{
color: #000000;
background-color: #dddddd;
font-family: "courier new", "times new roman", monospace;
font-size: x-small;
line-height: 1.3em;
/* Put a nice border around it. */
border: 1px solid #000000;
margin: 1px auto 1px auto;
padding: 1px;
width: 99%;
/* Don't wrap its contents, and show scrollbars. */
white-space: nowrap;
overflow: auto;
/* Stop after about 24 lines, and just show a scrollbar. */
max-height: 24em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
color: #000000;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: x-small;
line-height: 1.2em;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help
{
cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
width: 96%;
}

/* Highlighted text - such as search results. */
.highlight
{
background-color: yellow;
font-weight: bold;
color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
color: #000000;
background-color: #ecf3ee;
}
.windowbg2
{
color: #000000;
background-color: #F6F6F6;
}
.windowbg3
{
color: #000000;
background-color: #dbeadc;
}
/* the today container in calendar */
.calendar_today
{
background-color: #FFFFFF;
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg2, tr.titlebg2 th, tr.titlebg2 td
{
color: black;
font-style: normal;
background-color: #E9F0F6;
background-image: url(http://www.smfboards.com/Themes2/green/images/titlebg.jpg);
border-bottom: solid 1px #669c64;
border-top: solid 1px #FFFFFF;
background-repeat: repeat-x;
padding-left: 10px;
padding-right: 10px;
}
.titlebg, .titlebg a:link, .titlebg a:visited
{
font-weight: bold;
color: black;
font-style: normal;
}

.titlebg a:hover
{
color: #404040;
}
/* same as titlebg, but used where bold text is not needed */
.titlebg2 a:link, .titlebg2 a:visited
{
color: black;
font-style: normal;
text-decoration: underline;
}

.titlebg2 a:hover
{
text-decoration: underline;
}

/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers*/
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td
{
background-image: url(http://www.smfboards.com/Themes2/green/images/catbg.jpg);
background-color: #88A6C0;
color: #ffffff;
padding-left: 10px;
padding-right: 10px;
}
.catbg2 , tr.catbg2 td
{
background-image: url(http://www.smfboards.com/Themes2/green/images/catbg2.jpg);
background-color: #A1BFD9;
color: #ffffff;
padding-left: 10px;
padding-right: 10px;
}
.catbg, .catbg2, .catbg3
{
border-bottom: solid 1px #669c64;
background-repeat: repeat-x;
}
.catbg, .catbg2
{
font-weight: bold;
}
.catbg3, tr.catbg3 td, .catbg3 a:link, .catbg3 a:visited
{
font-size: 95%;
color: white;
text-decoration: none;
}
.catbg a:link, .catbg a:visited , .catbg2 a:link, .catbg2 a:visited
{
color: white;
text-decoration: none;
}
.catbg a:hover, .catbg2 a:hover, .catbg3 a:hover
{
color: #efffe0;
}
/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
background-color: #ADADAD;
padding: 0px;
}

/* This is used on tables that should just have a border around them. */
.tborder
{
padding: 1px;
border: 1px solid #696969;
background-color: #FFFFFF;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
font-size: x-small;
font-family: verdana, sans-serif;
}
.middletext
{
font-size: 90%;
}
.normaltext
{
font-size: small;
}
.largetext
{
font-size: large;
}


/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
width: 100%;
overflow: auto;
line-height: 1.3em;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
width: 100%;
overflow: auto;
padding-bottom: 3px;
line-height: 1.3em;
}

/* Sometimes there will be an error when you post */
.error{
color: red;
}


/* definitions for the main tab, active means the tab reflects which page is displayed */
.maintab_first, .maintab_back, .maintab_last, .maintab_active_first, .maintab_active_back, .maintab_active_last
{
background-position: left bottom;
color: white;
text-transform: uppercase;
vertical-align: top;

}
.maintab_back, .maintab_active_back
{
color: white;
text-decoration: none;
font-size:  9px;
vertical-align: top;
padding: 2px 6px 6px 6px;
font-family: tahoma, sans-serif;
}

.maintab_first
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_first.gif);
background-repeat: no-repeat;
width: 10px;
}
.maintab_back
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_back.gif);
background-repeat: repeat-x;
}
.maintab_last
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_last.gif);
background-repeat: no-repeat;
width: 8px;
}
.maintab_active_first
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_active_first.gif);
background-repeat: no-repeat;
width: 6px;
}
.maintab_active_back
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_active_back.gif);
background-repeat: repeat-x;
}
.maintab_active_last
{
background-image: url(http://www.smfboards.com/Themes2/green/images/maintab_active_last.gif);
background-repeat: no-repeat;
width: 8px;
}

/* how links behave in main tab. */
.maintab_back a:link , .maintab_back a:visited, .maintab_active_back a:link , .maintab_active_back a:visited
{
color: white;
text-decoration: none;
}

.maintab_back a:hover, .maintab_active_back a:hover
{
color: #efffe0;
text-decoration: none;
}
/* definitions for the mirror tab */
.mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last
{
background-position: left top;
color: white;
text-transform: uppercase;
vertical-align: top;

}
.mirrortab_back, .mirrortab_active_back
{
color: white;
text-decoration: none;
font-size: 9px;
vertical-align: bottom;
padding: 6px 6px 2px 6px;
font-family: tahoma, sans-serif;
}

.mirrortab_first
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_first.gif);
background-repeat: no-repeat;
width: 10px;
}
.mirrortab_back
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_back.gif);
background-repeat: repeat-x;
}
.mirrortab_last
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_last.gif);
background-repeat: no-repeat;
width: 6px;
}
.mirrortab_active_first
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_active_first.gif);
background-repeat: no-repeat;
width: 6px;
}
.mirrortab_active_back
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_active_back.gif);
background-repeat: repeat-x;
}
.mirrortab_active_last
{
background-image: url(http://www.smfboards.com/Themes2/green/images/mirrortab_active_last.gif);
background-repeat: no-repeat;
width: 8px;
}

/* how links behave in mirror tab. */
.mirrortab_back a:link , .mirrortab_back a:visited, .mirrortab_active_back a:link , .mirrortab_active_back a:visited
{
color: white;
text-decoration: none;
}

.mirrortab_back a:hover, .mirrortab_active_back a:hover
{
color: #e0e0ff;
text-decoration: none;
}


Deconectat -=[Vyorel]=-

  • SMF Free Helper
  • Administrator
  • Hero Member
  • *****
  • Mesaje: 1.036
  • Popularitate: +44/-4
  • Gen: Bărbat
  • I LOVE SMF
    • Xerom Zone Community
  • SMF Version: SMF 2.0.2
Re: Imagine fundal
« Răspunde #3 : Vineri 26 Februarie 2010, 11:08:55 »
Stiu ca e o intrebare stupida, dar .... unde sa incarc imaginea? Adica pe ce server?
Pe serverul de la host, cu FTP-ul.



Deconectat aligaby

  • Free Helper
  • Hero Member
  • *****
  • Mesaje: 633
  • Popularitate: +26/-2
    • Prieteni Pescari
Re: Imagine fundal
« Răspunde #4 : Sâmbătă 27 Februarie 2010, 13:28:27 »
1.Pentru a largi imaginea pe intreg backgroundul, ar trebui ca la incarcare siteului sa se citeasca rezolutia browserului si pe baza valorilor returnate sa se redimensioneze imaginea. Se poate face cu js sau php.
2.O alta metoda este "umplerea" zonei ramase cu o culoare care sa creeze impresia ca imaginea se intinde pe toata suprafata backgroundului.
3.Poti pune imaginea la o rezolutie foarte mare (ex: 1900x1200)

SMF România

Re: Imagine fundal
« Răspunde #4 : Sâmbătă 27 Februarie 2010, 13:28:27 »

Deconectat Ella

  • Newbie
  • *
  • Mesaje: 5
  • Popularitate: +0/-0
Re: Imagine fundal
« Răspunde #5 : Duminică 28 Februarie 2010, 11:54:34 »
Multumesc amandourora pentru ajutor. karma+