Make a div appear but not move subsequent elements down

I need to make a div be visible (for use of it's background) even though it will not contain anything, but not push other elements down.

My layout looks like this:

/----------------a--------------------\
|-------------------------------------|
|________________b____________________|

The one labeled a needs to be visible but it will contain nothing. This is so the background image can make box b look like it has some gloss on the top, and box b will contain the text. However, the text in box b needs to start at the top of box a, not underneath it, which is the default behaviour.

So box a needs to act like it doesn't exist as far as layout goes, but needs to act like it exists for the purposes of background image.

To deomonstrate, this is what it looks like now, the default way:

/-------------------------------------\
|-------------------------------------|
|       there is some text here       |
|_______and more text down here_______|

but I want it to be

/-------------------------------------\
|-------there is some text here-------|
|_______and more text down here_______|
5
задан Christopher Knowl 13 April 2011 в 12:57
поделиться