Need to make a div tag same width as preceding table

I have buttons in a button div tag I'd like to make the same width as the table above it. The buttons can not be part of that table since that's creating weird AJAX jqGrid delays and we solved that by moving it outside the table.

Now I just need to adjust the width.

I can use the padding: and set the right border, but do not want an explicit number of pixels. I want the right edge to line up with the right edge of the table above it.

I would like to use the float style, but want to make it resolution independent.

Can I request the width of the table? Then use that in the div tag?

Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
RartemassConnect With a Mentor Service Desk AnalystCommented:
I know you have requested the question to be deleted, but the general answer for this is to use percentages or ems when dealing with width.
Basically you will need to set the width of the table in ems (eg 10em) then set the width of the button to the same size.
If you already have pixels specified for sizes, you can use a converter to get the em value.
http://riddle.pl/emcalc/

Just for information, ems are a relative size to the width of the letter m in the system font. This means it scales based on the configuration of the system. Viewers can use any screen resolution at the page will still look in scale.
0
 
Bob LearnedCommented:
I would love to see some HTML/CSS, if you have it...
0
 
newbiewebSr. Software EngineerAuthor Commented:
I've requested that this question be deleted for the following reason:

We decided to put the button back into the table, which solved the problem. Sorry. I am killing the question. Thanks though...
0
 
newbiewebSr. Software EngineerAuthor Commented:
I will grant points for that answer event though I am not actively pursuing an answer.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.

And thanks LearnedOne. Sorry to abandon that few that catch your eye lately. Maybe next time...

Cheers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.