SimplePortal

Customization => Themes and Graphics => Topic started by: WasdMan on June 05, 2010, 01:20:27 PM

Title: Background
Post by: WasdMan on June 05, 2010, 01:20:27 PM
How do I change the background image to a new block?
Because it does not work:
Code: [Select]
<style>
  .vmi { background-color: #8080FF; background-image: url('http://smf-portal.com/Themes/default/images/modpopular.png'); center; background-repeat: no-repeat }
</style>
<table>
  <tr>
    <td class="vmi">
      Valami
    </td>
  </tr>
</table>
Title: Re: Background
Post by: Nathaniel on June 05, 2010, 11:18:44 PM
Where are you using that code? Which block type are you using?
Title: Re: Background
Post by: WasdMan on June 06, 2010, 08:39:40 AM
html blokk
Title: Re: Background
Post by: AngelinaBelle on June 07, 2010, 10:27:04 AM
The HTML tag <style> is only allowed in the HTML <head>, never in the <body> (http://www.w3schools.com/TAGS/tag_style.asp (http://www.w3schools.com/TAGS/tag_style.asp)). So you cannot put it in a block.
 
I can think of two ways to use your style.
1) Add CSS class selector .vmi your portal.css file, or to index.css or custom.css for your theme(s)
2) Use inline CSS style in that HTML block.
<td style="background-color: #8080FF; background-image: url('http://smf-portal.com/Themes/default/images/modpopular.png'); (http://smf-portal.com/Themes/default/images/modpopular.png');) center; background-repeat: no-repeat ">
SimplePortal 2.3.8 © 2008-2024, SimplePortal