Technology Software

How to Change a DIV With CSS Relative to Size

    • 1). Open the website file or application to access the code. The opening DIV tag should look like this:

      <div style="align:left">

      The value inside the quotation marks will vary depending on the function.

    • 2). Add a semicolon before the final quotation mark, and then type the following tags after the semicolon but before the ">" and ending quotation mark:

      height: auto; width:auto

    • 3). Inspect the final code to make sure the DIV element is styled for an automatic height and width. It should look similar to this:

      <div style="align:left; height:auto; width:auto;">

Leave a reply