0 votes
1 view
in Web Technology by (20.3k points)

I have a div tag with a width set to 800 pixels. When the browser width is greater than 800 pixels, it shouldn't stretch the div, but it should bring it to the middle of the page.

1 Answer

0 votes
by (40.3k points)

Try using the code given below:


    <div style="width:800px; margin:0 auto;">

        centered content



Welcome to Intellipaat Community. Get your technical queries answered by top developers !