Jump to content
s_avinash_s

background color

Recommended Posts

HI

I tried like below:

    body {
    background: lightblue;
    height: 60vh;
    width: 60vw; 
    margin: 20vh 20vw;
    }

But still getting full screen of background color

I try to modify it here 

https://www.w3schools.com/code/tryit.asp?filename=FVCO9L8U59J4

 

Edited by s_avinash_s

Share this post


Link to post
Share on other sites

That won't work on the body the background-color applied to body will always fill the whole browser window. you need to use a container block element within the body.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...