View Full Version : Nested DIV tags questions
wgregori
05-07-2007, 04:27 AM
I have a rudimentary question regarding nested DIV tags. If I have document setup like below and have Table elements set in both ID sectors Main and Content which ID Sector will prevail? Shouldn't the last ID Sector stated prevail?
<body>
<div id=main>
<div id=content>
</div>
</div>
</body>
Thanks,
Wayne
mwinter
05-07-2007, 10:52 AM
I have a rudimentary question regarding nested DIV tags. If I have document setup like below and have Table elements set in both ID sectors Main and Content which ID Sector will prevail? Shouldn't the last ID Sector stated prevail?
Your question isn't clear to me. The phrase "ID sector" doesn't have any technical meaning, so I don't know to what you're referring. Moreover, in what sense are these "sectors" supposed to prevail over one another?
Mike
wgregori
05-07-2007, 01:24 PM
Okay,
I've got my DIV ID=main where I have set some table parameters but further down my document I'd like to change those table parameters. I thought that I could just set up another DIV tag (ID=content) change my table parameters and have the tables that are between that DIV ID=content take on those new attributes.
<body>
<div id=main>
<div id=content>
</div>
</div>
</body>
jscheuer1
05-07-2007, 02:03 PM
You should be able to:
#main table {
border:1px solid black;
}
#content table {
border:5px dashed red;
}
yes. But if it were like so:
#main table {
border:1px solid black;
}
#content table {
font-weight:bold;
}
Tables in the content division would still inherit the 1px solid black border from being also in the main division.
CSS stands for cascading style sheets. That means, unless contradicted, the styles cascade throughout the document.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.