Skip to content
WJunction - Webmaster Forum

<code> help please

  • RT Thread starter RT
  • Start date Start date
  • 7 Replies
  • 1,165 Views
Status
Not open for further replies.

RT

Active Member
5,314
2009
1,571
135
Hello,
Any body can help add an image in the background in my <code>LINK</code> on wordpress please ?

here is my code now :
PHP:
.entry code {
background-color:#FFFFFF;
border-left:1px solid #CCCCCC;
display:block;
font-family:"Courier New",mono;
padding:5px 10px;

i tried adding :
PHP:
background-image:url(/public_html/wp-content/themes/scarlett/images/code.png);
but it didnt work...:( and this is the image i want to add in the background
76code.png
 

7 comments

Try:
PHP:
.entry code {
background-color:#FFFFFF;
background-image:url('/wp-content/themes/scarlett/images/code.png');
border-left:1px solid #CCCCCC;
display:block;
font-family:"Courier New",mono;
padding:5px 10px;
 
Tell me if this works:
PHP:
.entry code {
background-color:#FFFFFF;
background-image:url('/wp-content/themes/scarlett/images/code.png');
background-repeat: no-repeat
border-left:1px solid #CCCCCC;
display:block;
font-family:"Courier New",mono;
padding:5px 10px;
Edit:
PHP:
.entry code {
background-color:#FFFFFF;
background-image:url('/wp-content/themes/scarlett/images/code.png');
background-repeat: no-repeat
background-position: top left;
border-left:1px solid #CCCCCC;
display:block;
font-family:"Courier New",mono;
padding:5px 10px;
If the first code worked you can align the image to the left or right by editing:
PHP:
background-position: top left;
Change the top left to top right if you want the image to be aligned to the right.
 
Try:
PHP:
.entry code {
background-color:#FFFFFF;
background: url(/wp-content/themes/scarlett/images/code.png) top right no-repeat;
border-left:1px solid #CCCCCC;
display:block;
font-family:"Courier New",mono;
padding:5px 10px;
 
instead of add 20 thousand css things why dont u just do one?
PHP:
background:#FFFFFF url(image.png) rop right repeat-x;
instead of...
PHP:
background-postition:top left;
background-color:#FFFFFF;
etc....
 
Hey budda, thank you so much for taking the time and to me, that one worked great and i removed top and used only right :), thanks again!
Edit: u too naruto.
 
Status
Not open for further replies.

About the author

RT
Active Member · Joined
5,314
Messages
1,571
Reactions
113
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom