Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML div tags - positioning

 
Vinnie Jenks
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working w/ some drag & drop DHTML (ahem, sorry..."AJAX") :roll: - and I'm trying to figure out how to position <div> elements on my page. I've been coding web apps for years but have *always* avoided DHTML due to the inconsistencies across browsers but am trying to get up to speed.

I've got a div like so:



The problem is...this div is inside of a table cell (and has to remain this way, I need the tables)...and I need it to *stay* within the table cell...even though it is an absolute-positioned div. How can I make it stay inside of the table cell and move with the table when the browser is resized by the user?

Thanks!

-v
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64848
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
absolute: relative;


Is this just a typo? It is not valid. Thes CSS rule is 'position'.

I'm not absolutely sure what you are trying to do (position the div inside the cell?), but you may have better luck using margins rather than positioning.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic