Click to See Complete Forum and Search --> : Having a problem targeting an element


scouse
07-17-2008, 09:57 AM
Hi

I'm having problems applying some styles to some text on my website. Basically its something like this:


<div id="panel2">
<ilayer name="nscontainer">
<layer name="nscontent" id="nscontentcss">
THIS IS THE TEXT I WANT STYLEING

</layer>
</ilayer>
</div>


I've managed to edit the text color/size etc by targeting #panel2 but I want to apply some top padding to it, but when I did this:


#panel2{
padding-top: 5px;
}


This put padding around the ilayer, which I don't want, I just want it on the text. So I tried putting the padding style on the "ilayer" and the "layer" but I couldn't get either to work.

Thanks

Centauri
07-17-2008, 10:23 AM
I don't think "layer" and "ilayer" are valid html elements....

LeeU
07-17-2008, 03:40 PM
They were used by Netscape ...

scouse
07-18-2008, 05:16 AM
hmmmm, thats a bit of a shame. Downloaded a script for scrollable content but it uses an Iframe. I guess I'll have to look around for another script then! :(

Mr. E. Cryptic
07-18-2008, 06:43 AM
Downloaded a script for scrollable content but it uses an Iframe.

Might be a stupid question, but are you just trying to have an area that scrolls, without using an iFrame?

if so, any div with it's overflow set to auto or scroll will achieve this.

css:
.divName
{
overflow: auto;
/*The other styles you want to apply here*/
}

HTML
<div class="divName">
content here
</div>

scouse
07-18-2008, 10:49 AM
Hey mate,

Thanks, but no its not just a scrollable div.

This is the kind of effect I wanted to achieve

http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

ray326
07-18-2008, 12:22 PM
That some pretty ugly code but it looks to me like a modern version using clean Javascript and a scrolling div would be pretty easy to do.

scouse
07-21-2008, 04:26 AM
thanks ray326. I'll have a little look around the internet and see if I can find something a bit more suitable! :)