This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > Newbie CSS problem...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbie CSS problem...
Karm56

2004-08-02, 7:14 pm

Hi all,
I've run into a bit of a problem redoing our school website (summer's almost
over!). I'm trying to put a thin (~1px) border around "Popular Pages" and
"News". www.teacher-tutor.com/new_index.htm I think I'm inheriting a bum
cascade! :> )

Any help appreciated!

Mark



#layout {
width: 750px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
#layout, #layout td {
border: thin solid #000066;
border-collapse: collapse;


}
#nav {
width: 150px;
}
#nav, #nav td {border: none;
}

#maincontent {
width: 600px;


}
#maincontent, #maincontent td {
border: none;
padding: 25px;
}

body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
color: #000066;
background-image: url(images/newsmsbackground.jpg);
}
table {
background-color: #FFFFFF;
}

#footer, #footer td {
border: none;
}
.nav_cell_header {
background-color: #CCCCCC;
text-align: center;
font-weight: bold;
font-variant: small-caps;
border: 1px solid #00008B;
}

Osgood

2004-08-02, 7:14 pm

Karm56 wrote:

> Hi all,
> I've run into a bit of a problem redoing our school website (summer's almost
> over!). I'm trying to put a thin (~1px) border around "Popular Pages" and
> "News". www.teacher-tutor.com/new_index.htm I think I'm inheriting a bum
> cascade! :> )





add #nav td before .nav_cell_header as below.

#nav td.nav_cell_header {
background-color: #CCCCCC;
text-align: center;
font-weight: bold;
font-variant: small-caps;
border: 1px solid #00008B;
}

Murray *TMM*

2004-08-02, 7:14 pm

And don't use underscores in custom class names.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Osgood" <notavailable@atthisaddress.com> wrote in message
news:celor6$eqa$1@forums.macromedia.com...
> Karm56 wrote:
>
almost[color=darkred]
and[color=darkred]
bum[color=darkred]
>
>
>
>
> add #nav td before .nav_cell_header as below.
>
> #nav td.nav_cell_header {
> background-color: #CCCCCC;
> text-align: center;
> font-weight: bold;
> font-variant: small-caps;
> border: 1px solid #00008B;
> }
>



mzanime.com

2004-08-02, 7:14 pm

Murray wrote:
>And don't use underscores in custom class names.


Amen. I can't stand those.
Karm56

2004-08-02, 7:14 pm

Wow..that was fast! I'll get on it forwith immediately!

Thanks!
Mark
Osgood

2004-08-02, 7:14 pm

Murray *TMM* wrote:

> And don't use underscores in custom class names.
>

Right> You heard that!

Make it #nav td.navCellHeader


Murray *TMM*

2004-08-02, 7:15 pm

Neither can NN4x! 8)

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"mzanime.com" <webforumsuser@macromedia.com> wrote in message
news:celqkq$hlo$1@forums.macromedia.com...
> Murray wrote:
>
> Amen. I can't stand those.



Karm56

2004-08-02, 7:15 pm

Hi Osgood,
Well, that took care of that! Thanks! Where can I find out how your
suggestion worked?? I think I tried everything (in my CSS book(s) but could not
find an answer.

Thanks again for taking the time to help!
Mark

Osgood

2004-08-02, 7:15 pm

Karm56 wrote:

> Hi Osgood,
> Well, that took care of that! Thanks! Where can I find out how your
> suggestion worked?? I think I tried everything (in my CSS book(s) but could not
> find an answer.
>
> Thanks again for taking the time to help!
> Mark
>

id selectors outrank class selectors. In your senario even though the
class came lower in the cascading css order the cell took its properties
from the superior id selector.

When you combine the two its saying apply this class, to this cell, with
this id.

mzanime.com

2004-08-02, 7:15 pm

Osgood wrote:
>id selectors outrank class selectors.


So thats what was happening... I knew it looked "out of order". I do believe
what you are saying Osgood, but do you know of a W3C page which states this?

Karm56

2004-08-02, 7:15 pm

Thanks! Makes sense now.

Mark
Osgood

2004-08-03, 7:14 am

mzanime.com wrote:

> Osgood wrote:
>
> So thats what was happening... I knew it looked "out of order". I do believe
> what you are saying Osgood, but do you know of a W3C page which states this?
>


Sorry, I dont know of a specific page but im sure there probably is one.
My knowledge mostly comes from what other, well respected contributors,
in my opinion of course, have said around here and in the PV11 forums.

It's fairly well known that an id selector will push a class selector
aside unless the class selector is applied correctly.

I dont tend to read too much on the W3C site, it only confuses me. I
think some issues are a lot simpler than they actual explain them to be.
Sometimes I will read an entry and be none the wiser, which rather
defeats the objective.

Very often someone with 'street' knowledge will explain in a few
paragraphs what the W3C take pages to explain. <yawn>

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews