Jump to content

Box frame & Width etc


mickeymouse

Recommended Posts

I'm not getting a frame and I'm not getting a width of 40% but a very large width wider than my screen.  Why?

<table style='cellpadding:10; cellspacing:0; align:center; width:40%; frame:box; border:1; bordercolor:Blue'; background-color:lavendure' >

Same thing with

<table cellpadding:10; cellspacing:0; align:center; width:40%; frame:box; border:1; bordercolor:Blue; background-color:lavendure >

 

 

Link to comment
Share on other sites

cellpadding  and cellspacing are not css, they are table element attributes.

In CSS, padding is equivalent to cellpadding and border-spacing: is equivalent to cellspacing.

bordercolor must have hyphen after border as in border-color. You also have misplaced single quote after the border-color value, so again it will wrongly interpret what you want.

Link to comment
Share on other sites

 

I've corrected the error(s) and put everything as Table attributes and so I get the correct results except for the width - it doesn't work.  I just can't understand why not and can't see anything wrong with my attribute spec.  I use the same thing in other pages and it works fine.  

<table cellpadding='10' cellspacing='0' frame='box' width='40%' border='1px'; border-color='Blue' background-color='lavendure' align='center'>

P.S. All the best to you in 2020!

Link to comment
Share on other sites

Now you are turning css into invalid attributes?

The only valid attributes are cellpadding, cellspacing and width, the border would also valid if it didn't include unit 'px'.

The rest are CSS and should not use a equals sign but instead a colon : and no quotes, the only quotes used are with style attribute which the css is placed within.

Note: frame="box" is obsolete

Link to comment
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
×
×
  • Create New...