• 0
Sign in to follow this  
Followers 0

Table Border not Showing in Text Widget - With Custom CSS

Question

Posted · Report post

Hi there, I am trying to include a calendar from another site in a text widget in my sidebar. The other website gave me an iframe code in which the text comes right to the edge of the frame. I tried inserting it into a table with a border that matches the frame background which looks correct when I test the code in a browser, but the border does not show on the blog. I even added some css to my child style.css to no avail. Here is the html:

And here is the CSS I added: table {border: 10px gold;} td {border: 0px solid gray; padding:10px;} th {background-color:#231f20; color:white; padding:10px;} Here is the site: www.shootthecameraman.com/blog/ Thanks!

Share this post


Link to post
Share on other sites

10 answers to this question

  • 0

Posted · Report post

[code][/code] ^ Please remove "bgcolor="#231f20" border=10 bordercolor="#d1ad54" since you're already adding CSS to change the background, border, and border color.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I did so, and it did not change anything...

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

[code]table {border: 10px gold;} td {border: 0px solid gray; padding:10px;} th {background-color:#231f20; color:white; padding:10px;}[/code] ^ Is this the only CSS you have in the Custom CSS box so far? Can you paste any other CSS you have?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

This is the style.css file for the child theme. /* Theme Name: Platform Child Description: A Child of Platform Author: admin Template: platform (optional values you can add: Theme URI, Author URI, Version) */ @import url("../platform/style.css"); table {border: 10px gold;} td {border: 0px solid gray; padding:10px;} th {background-color:#231f20; color:white; padding:10px;}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Try giving your table a class like so: [code]
[/code] For the CSS, try adding this: [code]table.customtable {border: 10px gold;} table.customtable td {border: 0px solid gray; padding:10px;} table.customtable th {background-color:#231f20; color:white; padding:10px;}[/code]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That did not work either... Is there something in the Platform style sheet that would be interfering. Even though the Child style sheet should supercede it?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

This part; [code]/* Default Entry Table */ table {width: 100%;} .hentry table, #comments table {margin-bottom: 1em;} .hentry table th, #comments table th { font-weight: normal; text-align: center; padding: .3em;} .hentry table td, #comments table td {padding: .35em .6em; text-align: center;} .hentry table .label, #comments table .label{text-align:left;}[/code] may be? it is overwriting all my table records:S

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can remove the table code and just add the styling to the iframe itself: [code]iframe#widgetPreviewFrame { border: 5px gold solid; }[/code] or [code]iframe#widgetPreviewFrame { background: gold; padding: 5px; }[/code]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks Kastelic! That worked perfetctly!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

One more question... The border is great, but the text within the iframe goes right to the edge. I've tried padding but that increases the space between the border and the frame. Any ideas?

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
Sign in to follow this  
Followers 0