The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

how can i change widget background color?

+2
Master Marc
emikati
6 posters

Go down

how can i change widget background color? Empty how can i change widget background color?

Post by emikati July 18th 2009, 12:13 pm

Hi ya.. my widget background color is in blue.. i want to make a new custom widget in which i want to put white background (only for that widget not for all).. wat code should i write to make its background white...plz help
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by Master Marc July 18th 2009, 6:37 pm

Try adding this html code in your widget please.

Code:
<body bgcolor="green">
</body>

You can change the color green to any color you would like by editing the text green in the code.
Master Marc
Master Marc
Hyperactive

Male Posts : 3661
Reputation : 47
Language : English and Spanish.

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by emikati July 18th 2009, 9:57 pm

marc, i hv tried this code but not working .. how can i change widget background color? Bgcodi10 I love you
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by Sanket July 19th 2009, 6:13 am

I believe this body code will work only in html pages.

In a widget that code would not work. I think via css, probably it could be done. I am not sure though.
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by ankillien July 19th 2009, 6:16 am

You can use CSS for that.
Put your code between the div tags like below...

Code:
<DIV style="background-color : COLOR_NAME;">
OTHER CODES HERE
</DIV>
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by RoNo July 19th 2009, 8:25 am

You can create background color for widgets by using tables.

Examples...

Widget code and text without a table
how can i change widget background color? BattletankTable0s
[ Click to view full size images ]



With Tables

Padding: 8px / Border: 1px
how can i change widget background color? BattletankTable1e1s




Padding: 30px / Border: 1px
how can i change widget background color? BattletankTable1e2s
Colors: Background #E1EBF2 Border #CCCCCC





Use this code to create a table with white background (borderless)
If you want a mild border, change: border width 0px to 1px
Code:
<center><table style="background-color: #FFFFFF; border: #CCCCCC; border-style: solid; border-width: 0px; margin-left: 3px; margin-top: 12px; padding: 8px;"><tr><td>

YOUR WIDGET CODE HERE

</td></tr></table>
[ Turn off "forum table type" @ General options of the widget: Use a table type: "No" ]
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by Ultyma2 July 21st 2009, 3:27 am

emikati wrote:Hi ya.. my widget background color is in blue.. i want to make a new custom widget in which i want to put white background (only for that widget not for all).. wat code should i write to make its background white...plz help

MEMBER BANNED ~~MRMARIO
avatar
Ultyma2
New Member

Posts : 6
Reputation : 0
Language : Engrish

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by emikati July 21st 2009, 3:53 am

ankillien wrote:You can use CSS for that.
Put your code between the div tags like below...

Code:
<DIV style="background-color : COLOR_NAME;">
OTHER CODES HERE
</DIV>

where to put color name or code ..plz also mention it
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by ankillien July 21st 2009, 4:22 am

First go to Widget Management....create a custom block.
Put my code in widget source.
Niw you can add your content between the DIV tags, remove the 'OTHER CODES HERE' and place your text/code there.
Change the COLOR_NAME with your desired background color.

Hope this helps.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by emikati July 21st 2009, 4:25 am

i want to change it to white background, does the following code wid white text wud works by replacing the COLOR_NAME

Code:
<DIV style="background-color : white;">
OTHER CODES HERE
</DIV>
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by ankillien July 21st 2009, 4:34 am

No, white text won't show on a white background...
If you want to change text colors, use this code...

Code:
<DIV style="background-color : white; color : TEXT_COLOR;">
OTHER CODES HERE
</DIV>
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by emikati July 21st 2009, 4:35 am

just give me the direct code for changing the background color of widget to white..
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

how can i change widget background color? Empty Re: how can i change widget background color?

Post by emikati July 22nd 2009, 2:44 pm

bump
emikati
emikati
Forumember

Male Posts : 393
Reputation : 0
Language : English, HTML

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum