Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

maybe I don't understand DHTML after all

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
I am exploring DHTML and have spent a fair amount of time reading different things, including the CSS standards. I thought I was understanding how to do some things and why they are done the way they are.

Here is my problem. I am experimenting and playing around with some stuff and I can not seem to get a div tag to have a background color or to position properly.

my code is like this
Code:
(in an asp include file I have here to the end of the style)
<STYLE TYPE=&quot;text/css&quot;>
<!--
BODY
{
font-family: &quot;Arial&quot;,sans-serif;
font-size: 12pt;
}
#testS{
position: absolute;
left: 525px;
top: 5px;
width:75px;
height: 25px;
clip:rect(0px 10px 10px 0px);
font-family: &quot;Arial&quot;,sans-serif;
font-size: 10pt;
background-color: #7575AA;
layer-background-color: #7575AA;
}
#test2{
position: absolute;
left: 450px;
top: 5px;
width: 75px;
height: 25px;
clip:rect(0px 10px 10px 0px);
font-family: &quot;Arial&quot;,sans-serif;
font-size: 10pt;
background-color: #7575AA;
layer-background-color: #7575AA;
}
-->
</style>


<div id=&quot;tstSize&quot; class=&quot;testS&quot;>Member Services</div>
<DIV ID=&quot;testNext&quot; class=&quot;test2&quot;>
		Next to It</div>

I have a couple other div tags on the page as well, and they both work very well and I can reposition them without a problem.

The fact that I just looked at an example with a small colored rectangle and other than the style being in-line it was really no different than what I have done. But my rectangles will not position themselves to the position I have set(they are simply left aligned one above the other) and they are not colored in any way.

The CSS standards document says the background color should apply to all elements I assume that includes div's, if I am wrong in this assumption I would certainly like to know. I have read several different things explaining CSS, javascript and DHTML and am still working on the CSS standards doc, bits at a time, but I just can not seem to get anything to work properly so maybe I am just missing some crucial element to understanding the process.

Please help X-) [sig]<p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
[/sig]
 
I figured out that I was mixing up my leading identifier in my styles. I was creating them using the # sign where I should have been using . which was causing my problems. I think I will go back and take a look at some of the first stuff I read about that part so I can get my terminology and useage a little clearer in my mind. [sig]<p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top