Hello, I was wondering what it is I need to do in order for my width of the div tag to be 1000px; and then it will shrink/resize the width of it if the browser shrinks/resized?


Thank you

I would probably use a percentage as your width. That way it will change as you resize the browser.

commented: agreed +1

inplainsite is right, instead of setting width as 1000px, use width="100%" or so to be able to fit to browser's window automatically

Not saying that the % width solution won't work it does quite nicely but sometimes you may need a more precise control of your width. For this you could also use javascript:

function changeDivSize()
{
 alert('window.onresize fired');
 /* here you would grab the div and change height/width */
}
window.onresize = changeDivSize;

oh interesting. i'm not that familiar with javascript. can you please explain some more about it?

Also, how would u do the width so if i do the % it has a minimum width so the tables won't collide or the tables wont squeeze to a thin table.

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.