1.11M Members

Width Auto Resize to fit Screen

 
0
 

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

 
1
 

you can use:

width=100%
 
0
 

you can use:

width=100%

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

 
0
 

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.

 
0
 

thanks MidiMagic i'll try it out :)

 
0
 

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.

 
0
 

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

 
0
 

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?

 
0
 

Good subject!!

 
0
 

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

Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

You
This is an OP Kudos discussion and contributors may be rewarded
Post:
Start New Discussion
View similar articles that have also been tagged: