Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
.home-page{
float:left;
width:100%;
height:100%;
background:url(images/background.jpg) top center no-repeat;
background-size:100% 100%;
}
.home-contents-container{
float:left;
margin-left:2%;
width:96%;
height:100%;
position:relative;
}
.contents-container{
float:left;
margin-left:2%;
width:96%;
position:relative;
}
.home-logo{
float:left;
width:100%;
text-align:center;
margin: 50px 0 5% 0;
}
.home-logo img{
width:100%;
}
.home-center-body{
width:100%;
margin: 0 auto!important;
text-align:center!important;
}
.home-links {
width: 100%;
margin: 0 auto!important;
text-align: center!important;
}
.home-center-body a{
font-size:40px;
color:#FFF;
padding: 10px;
border:1px solid #fff;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
text-transform:uppercase;
letter-spacing:4px;
float: left;
margin: 0 0 0 15px;
}
<div class="main-container">
<div class="home-page">
<div class="home-contents-container">
<div class="home-logo">
<a href="<?php echo site_url(); ?>">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png"/>
</a>
</div>
<div class="home-center-body">
<div class="home-links">
<?php
$SQL = mysql_query("Select * from wp_posts where post_type = 'page' and post_parent = 0 and post_status = 'publish' order by menu_order ") or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($SQL); $i++){
?>
<a href="<?php echo get_permalink( mysql_result($SQL,$i,'ID') ); ?>">
<?php echo mysql_result($SQL,$i,'post_title');?>
</a>
<br/>
<?php } ?>
</div>
</div>
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
<div class="home-links">
<?php
$SQL = mysql_query("Select * from wp_posts where post_type = 'page' and post_parent = 0 and post_status = 'publish' order by menu_order ") or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($SQL); $i++){
?>
<a href="<?php echo get_permalink( mysql_result($SQL,$i,'ID')
<?php echo mysql_result($SQL,$i,'post
</a>
<br/> ***remove this line***
<?php } ?>
</div>
</div>
Then in your CSS file, remove the "float: left" tag:
.home-center-body a{
font-size:40px;
color:#FFF;
padding: 10px;
border:1px solid #fff;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
text-transform:uppercase;
letter-spacing:4px;
float: left; ***remove this line***
margin: 0 0 0 15px;
}