hi guys, is there a way to auto resize the width to fit the screen? is it possible?

you can use:

width=100%
Member Avatar for ingeva

you can use:

width=100%

To fill the screen you must also maximize the window.
Who would ever want to do that? :)

The width attribute is deprecated. Use a style:

.wfl {width: 100%}

Then, in the tag you want to be wide, put the following:

<tag class="wfl">

The tag will assume the full width of its container.

thanks MidiMagic i'll try it out :)

i would suggest that you float your tables on 100%. the main advantage on using percentages is that you would style the sheet according to most people's screens. visit sitepoint.com for more info on styling on CSS. they have a huge selection on books for you to sort your problem.

Indeed to have a fluid layout you will have to use % to determine the width instead of pixels.

Member Avatar for Rhyan

Actually <div> element is 100% stretched by default, unless contained in another block element with fixed widht, or unless floated. So, if you are using div's and do not use neither float, nor width properties, they will be still 100% wide.
Now, what is your goal so we could help more?

Good subject!!

thanks guys, the css max-width: 100%; works!

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.