CSS Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm experienced at writing HTML but a newbie with CCS, learning on the fly.

In one of my sites I've used CSS to style my lefthand navigation and the
links are styles as blocks, with background changing on rollover etc.
They're contained in a cantainer called #navbutton, but the problem I
have is that behavior from within #navbutton sometimes spills over into
links within my main content, #content.

A good page to illustrate this is
http://www.corfu-san-stefanos.co.uk/san-stefanos-car-hire.htm , and for
info the stylesheet is at http://www.corfu-san-stefanos.co.uk/style3.css

(this is the site I'm building to teach myself CSS in the raw - I know
it's not pretty - yet!)

Any pointers welcome!


Re: CSS Problem

On 10/8/2010 1:06 AM, Rich wrote:
Quoted text here. Click to load it

Switch #navbutton to .navbutton in your css and remove id="navbutton"
from the html.  There is only one id navbutton allowed per page.

Using FireFox I could not see the problem but sometimes invalid code
will give display erratic problems.

TK ~ aka Terry Kimpling
http://wejuggle2.com/circusskills.php learn/make juggle/balance equipment
There are three ages of man: youth, middle age, and "Gee, you look
good." Red Skelton

Re: CSS Problem

On Fri, 08 Oct 2010 07:29:07 -0500, TK wrote:

Quoted text here. Click to load it

Adding to TK's advice, W3C's HTML validator catches a few errors you
will want to correct:


FYI, they also have a CSS validator at:

http://jigsaw.w3.org/css-validator /

It's a good habit to validate all your HTML and CSS as a matter of course,
even if pages display as intended.

Site Timeline