Home > Software engineering >  In HTML how can I create a rectengular white space that I can easily control to get bigger or smalle
In HTML how can I create a rectengular white space that I can easily control to get bigger or smalle

Time:10-22

so I am just trying to learn how to create a rectangular white space in HTML I want to be able to modify it like move it around or make it smaller or bigger more easily

CodePudding user response:

if that rectangular white space you are talking about is a div you can use inline styles that uses css to make anything on html looking the way you want it to look like, for you case you can do

<div style="height: 100px; width: 100px"></div>

if the white space is an input or a textarea you can use the same style attribute.

CodePudding user response:

You can play around using a <div> element. You can play around resizing it with the width and height properties inside the style attribute.

<html>
<div style="background-color: gray; width:600px; height:600px">
  <div style="background-color: white; width:100px; height: 100px; position: relative; left: 50px"></div>
</div>
</html>

You can play around with the positioning property. More info on that in W3 Schools https://www.w3schools.com/css/css_positioning.asp

Hope this helps!

  •  Tags:  
  • html
  • Related