Jump to content

Recommended Posts

So This Is My Code:

<STYLE>
.Menu A {
BACKGROUND-IMAGE: URL('images/bottombar_start.png')
WIDTH: 97PX
HEIGHT: 30PX
}
.Menu A:HOVER {
BACKGROUND-IMAGE: URL('images/bottombar_startover.png')
}
</STYLE>

<DIV CLASS="Menu" ALIGN="CENTER"><A HREF="#"> </A></DIV>

 

 

But It Doesnt Display Right The Background Image Size Is All Wrong

Can Anyone Please Correct The Code Or Tell Me Where Im Going Wrong

 

Thanks

Tarun

Link to comment
https://forums.phpfreaks.com/topic/36790-background-image-help/
Share on other sites

first off, make everything lower case.  While I don't think CSS is case sensative, it is better practice because XHTML is, and I've never seen CSS written in caps. 

 

Second, you didn't explain the problem clearly, but I would guess you need to make the anchor tag a block element (e.g., display:block).  I'm guessing the width and height you specified is the size of the background image, yes? And remove the single quotes in the url declaration (e.g., url(images/bottombar_start.png).  Please be more specific  about the problem. It could very well be another part of your css playing games somewhere else if you have anything else. 

Link to comment
https://forums.phpfreaks.com/topic/36790-background-image-help/#findComment-175640
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.