小编tok*_*owp的帖子

如何使用CSS或HTML居中导航栏?

我很难将导航栏居中放在此页面上.

我尝试nav { margin: 0 auto; }了一些其他的方法,但我仍然无法集中它.

html css nav centering

10
推荐指数
2
解决办法
30万
查看次数

如何php if else语句并返回不同的div?

我正在尝试创建一个 if-else 语句,它将返回不同的 div。我认为它失败了,因为'else 语句中的内容太多。

<?php $blogentryid = get_the_ID(); 

if ($blogentryid=="1572") {
echo '<div>Hello</div>'
}

else {
echo '<div class="socialnews2"><!-- start div social-->

                                <div class="twitternews2">
                                <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<?php the_title(); ?>" d
ata-url="<?php the_permalink() ?>" data-via="giantmangocom">Tweet</a>
                                <script type="text/javascript">
                                //async script, twitter button fashiolista.com style
                                (function() {
                                var s = document.createElement('SCRIPT');
                                var c = document.getElementsByTagName('script')[0];
                                s.type = 'text/javascript';
                                s.async = true;
                                s.src = 'http://platform.twitter.com/widgets.js';
                                c.parentNode.insertBefore(s, c);
                                 })();
                                </script>
                                </div>
                        </div>
                                <div class="facebooknews2">
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&
amp;show_faces=false&amp;width=80&amp;action=like&amp;colorscheme=light;height=21"" …
Run Code Online (Sandbox Code Playgroud)

php if-statement

0
推荐指数
1
解决办法
3万
查看次数

标签 统计

centering ×1

css ×1

html ×1

if-statement ×1

nav ×1

php ×1