Style not displaying when called using page-id in

2019-07-21 09:47发布

I was working in this site My Site . In the home page I have called the contents of a page using the following code

<?php 
$id=48; 
$post = get_post($id); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;  
?>

And my content is

<strong>Atlanta Weekly Schedule:</strong>

Sunday Explosive Service 10am - 12:15pm

Wednesday Bible Study, 7 - 8:30pm

Friday Freedom Night (Prayer, Prophetic, Miracle &amp; Deliverance Service), 7 - 10pm

&nbsp;

&nbsp;

<strong>New York Weekly Schedule:</strong>

Sunday Explosive Service 10am - 12:15pm

Wednesday Bible Study, 7 - 8:30pm

Friday Freedom Night (Prayer, Prophetic, Miracle &amp; Deliverance Service), 7 - 10pm

As you can see the I have given two heading with tag .But when it is displayin in the home page the source shows th ecode with but not displaying as bold.Someone please help me!! THANKS!!

2条回答
放我归山
2楼-- · 2019-07-21 10:35

I have reviewed your website as mentioned and traced your css file. In reset.css you have mentioned font-weight: inherit for strong tag.

So its trying to inherits this property from its parent element.

For more information visit: http://www.w3schools.com/cssref/css_inherit.asp

查看更多
淡お忘
3楼-- · 2019-07-21 10:40

Add following CSS to your code

strong { font-weight: bold; }

It will work

查看更多
登录 后发表回答