Jump to content
Sign in to follow this  
tonyrage

Table Border not Showing in Text Widget - With Custom CSS

Recommended Posts

tonyrage    0
tonyrage

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
catrina    103
catrina
[code][/code] ^ Please remove "bgcolor="#231f20" border=10 bordercolor="#d1ad54" since you're already adding CSS to change the background, border, and border color.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
catrina    103
catrina
[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?

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
tonyrage    0
tonyrage
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
catrina    103
catrina
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]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
tonyrage    0
tonyrage
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
minasm    1
minasm
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
kastelic    6
kastelic
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
tonyrage    0
tonyrage
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