I want to have a position:relative element inside another. Position:absolute actually would work better, but I don't want to mess with all of that. So how can I get something like Daniweb's [CODE_] thing? I want to have a main DIV, with a DIV inside, on the left. The DIV inside will have a grey background and line numbers (just like Daniweb's code again). How can I do this, because when I make the inside DIV go to the top left like this:

,inside
{
position:relative;
background-color:#CCCCCC; /*Not sure about the color*/
top:0;
left:0;
/*some more stuff*/
}

it doesn't go to the top left. What kind of positioning should I use? Or any other suggestions? Sorry if it's not clear, ask if you want me to explain it more clearly.

Thank you everyone, because by posting this, I answered my own question. The way you have to do it is to use the margins. Like this:

margin-top:50px;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.