Jump to content
mickeymouse

Height not working.

Recommended Posts

My css  definition is:

p.six {width: 50%;  height: 250px; margin-top: 30px; margin-left: auto; margin-right: auto; margin-bottom: 0px; 
    border-style: solid; border width: 2px; border-color: blue; align: center; text-align: center; 
    padding: 30px; background-color:white}

Whatever I do with the "height" specification or even remove it completely, the height of my box remains the same at the original 250px.

Actually, just noticed that a few other things don't work - like the width and background-color.  I change these and nothing happens; it retains the original specs.

 

 

Share this post


Link to post
Share on other sites

OK.  It looks like I'm using the wrong tag to get my box and write-up in the box.

It seems I should be using Table tag which I've now tried. 

However, the width or  max-width is not working.  I show 50% but the box takes up the width of me widest line of text.

Share this post


Link to post
Share on other sites

You shouldn't use a table. Just set min-height rather than height. This solution won't work for tables.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×