Jump to content

Recommended Posts

I have been using the <block-size: XX%;> property to prevent a table from resizing on different screens but I can't seem to get it right, what could I use to solve this?

this is an example of how I'm applying the code:

HTML


<div .div-central>

        <tr>example1</tr>

        <tr>example2</tr>

        <tr>example3</tr>

</div>

 

Css

 

.div-central {

block-size: 60%;

}

Share this post


Link to post
Share on other sites

You're not applying the CSS class to the element.  You use the class attribute to tell it which classes to use, you don't just write the CSS selector inside the HTML tag.

Share this post


Link to post
Share on other sites

Considering block-size is experimental and only works for Firefox browsers, why even think of using it? Also you can't use div within table how you have shown, only outside the table or within a table td element, which also must be within a tr element to take the text 'example#'.

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

×