Div alignment to center on zoom in & out

2019-06-07 22:24发布

I have site http://www.d1210091-6206.cp.blacknight.com/site/home/ having alignement issue for zoom in & out for the particular section (News & fb ) div id footerwrapper on the page. All other are aligned centerly on zoom in & out.

I am sending you the screen shot also. http://screencast.com/t/e95jEwR6dki

3条回答
疯言疯语
2楼-- · 2019-06-07 22:41

I check your code, if you touch the file style.css, the style for the element #footer, and if you don't use

float: left; margin-left: 210px; width: 600px

Erase it, the div#footer will be centered. But at all the facebook section, you will find it with a little crop on the top. You can leave some margin or padding for that.

In a temporary Backup old shool method, you can use the tag (not recommended if you want to change the styles more freely), with two columns and width specified width for each one.

Greetings

查看更多
Viruses.
3楼-- · 2019-06-07 22:41

You have to delete "margin-left: 210px" from #footer. It overwrites the "margin: 0 auto;" from .container-12 class.

查看更多
再贱就再见
4楼-- · 2019-06-07 22:55

I would suggest use of bootstrap, like this it was helpful to me..

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-left" style="border:1px dashed red; ">
  I will be at left

</div>

<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center" style="border:1px dashed blue;">
  I will be at center

</div>

<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-right" style="border:1px dashed green;">
  I will be at right

</div>

查看更多
登录 后发表回答