Jump to content
mickeymouse

Box frame & Width etc

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 >

 

 

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks.  I made the corrections and all is OK now.

However, if frame="box" is obsolete, how do I get a box?

Share this post


Link to post
Share on other sites

The CSS border properties you are using will give equivalent of frame="box"

You require border-width: 1px;, border-style: solid; and border-color: blue; OR shorthand equivalent

border: 1px solid blue;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...