Question : How to align div to center in the CSS

I would like to create simple webpage with HTML and CSS.
I would like to add all contente to main div, which should be aligned to the center.
Left side and right side of main div should fllex its width according to available resolution in the browser. I would like all major browser supported. How do it with DIV? I don't want to use HTML tables

Thanks for your help!
 

Answer : How to align div to center in the CSS

You get an InvalidOperationException when you try to execute an operation on an object but the object is not yet in he right state to be executed.

It could be because you don't open the connection.

Can you post the code what executes the connection
Random Solutions  
 
programming4us programming4us