Web Analytics Made Easy -
StatCounter style = 2 things - CodingForum

Announcement

Collapse
No announcement yet.

style = 2 things

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resolved style = 2 things

    Really quick question - I've been trying to make the height and width of a button 100% with this: button style= "height:100%" "width:100%"

    Which doesn't work. I've also tried these variations:

    button style= "height:100% width:100%"
    button style= "height:100%" style= "width:100%"
    Last edited by HalPlz; Sep 19, 2016, 09:08 PM.

  • #2
    100% of what? Percentage rely's on the container to have measurements. Need the whole code to answer your question.
    This works:
    Code:
    <body>
    <div style="height:300px;width:200px;">
    	<button style="height:100%;width:100%;">Push</button>
    </div>
    </body>
    But this is so much better:
    Code:
    <body>
    <button style="height:300px;width:200px;">Push</button>
    </body>
    Why complicate code or make it hard to understand?
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

    Comment

    Working...
    X