0

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.

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by kooia
0

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;
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.