[thelist] positioning a DIV nested within an A

Scott Schrantz scotts at rci-nv.com
Tue Sep 14 09:21:36 CDT 2004

> -----Original Message-----
> From:  Ben Yates
> <div><div><a><div></div></a></div></div>
> Is it possible to position the innermost div's right edge 20 
> pixels from the outermost div's right edge?  I haven't had 
> any luck breaking out of the a tag, so to speak.

Well, you can't nest a DIV inside an A, so you're off on the right foot.
It's just not valid code, and all bets are off as to what the browsers
will do with it.

Depending on what you're doing, you can ditch the innermost DIV and just
set that A to display: block, which will make it display like a DIV.
Then you can play with margins and/or padding to get the 20 pixels you

Scott Schrantz
work: www.rci-nv.com
play: www.computer-vet.com/weblog/

More information about the thelist mailing list