Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Rollover within a DIV Re: CSS Rollover within a DIV

#64869
screencat
Member

As simple as it sounds to get you were you want, the harder it is actually to fix your problem because you didn’t write the code yourself. There’s not even a background-image inside the "div" or "a" tag.

A good advice: throw that editor (whatever software that is) away (seriously) and LEARN CSS by hand-coding it – it is the only right way to do it. Everything else won’t get you far and you will waste a lot of time trying to understand machine-coded CSS which will never be as simple and flexible as it needs to be.

To illustrate how simple your problem is, here’s some code

Code:
// HTML

Section A

// CSS

a.button {
background: url(someimage.jpg) top left no-repeat;
display: block;
height: 30px;
width: 150px;
}

a.button:hover {
background-position: bottom left;
}

There are newer books but this is the only CSS book I read and which I can still recommend for beginners.
http://www.sitepoint.com/books/css2/