2016-05-31 87 views
0

enter image description here我有移动地址左对齐的问题,它仍然没有在所有

我试着地址移到最左边的角落里工作,但它并没有在所有的工作。

这是我试图将地址移动到最左边的角落,但如此 远远没有工作。

<!-- Page Content --> 
<div class="container"> 

    <!-- Column address below --> 

    <div class="column"> 
    <div class="row"> 
     <div class="col-md-6"> 
     <p class="example"> 
      Baylight Construction LLC 1022 boyle street 
      <br>Tel- (232)233-4323 Fax-(232)233-2323 
     </p> 
     </div> 
    </div> 
    </div> 
</div> 

CSS:

.nav a { 
    color: white; 
    font-size: 15px; 
    font-weight: bold; 
    padding: 40px 35px; 
    text-transform: uppercase; 
} 
nav li { 
    display: inline; 
} 
img { 
    height: 175px; 
    width: 175px; 
} 
.fixed-nav-bar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    z-index: 9999; 
    width: 100%; 
    height: 165px; 
    background-color: green; 
} 

//I've tried that class example and row and none of didn't move to 
//far left corner 
.example { 
    text-align: left; 
    float: left; 
    margin-left: 5px; 
    padding-left: 10px; 
} 
.row { 
    float: left; 
} 
+1

创建问题现场https://jsfiddle.net例子 –

回答

0

看你的代码示例我猜你正在尝试使用白手起家自己的类来定位ADRESS。在这种情况下,你遇到的问题并不是你的元素在类“example”中没有将自己定位到它们容器的左侧。

这就是您正在使用的容器类具有固定宽度,具体取决于屏幕宽度以及屏幕居中。在你的情况下,容器类将有一个宽度:

屏幕:< 768px:容器的宽度:(自动)

屏幕:≥768px:容器的宽度:750px

屏幕:≥992px :容器的宽度:970像素

屏幕:≥1200像素:容器的宽度:1170px

为了使您的容器占据屏幕的整个宽度改变容器类到容器流体,这是全宽容器的引导类。 现在不再占用固定宽度,容器将始终占用屏幕宽度的100%,因此您的地址栏将放置在最左侧。

查看您编辑的示例 here或下面的代码片段。

//I've tried that class example and row and none of didn't move to 
 
//far left corner 
 
.example { 
 
    text-align: left; 
 
    float: left; 
 
    margin-left: 5px; 
 
    padding-left: 10px; 
 
} 
 
.row { 
 
    float: left; 
 
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> 
 
<!-- Page Content --> 
 
<div class="container-fluid"> 
 

 
    <!-- Column address below --> 
 

 
    <div class="column"> 
 
    <div class="row"> 
 
     <div class="col-md-6"> 
 
     <p class="example"> 
 
      Baylight Construction LLC 1022 boyle street 
 
      <br>Tel- (232)233-4323 Fax-(232)233-2323 
 
     </p> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

0

我已经尝试了这一点,试试这个,看看click here

<div class="container"> 

    <!-- Column address below --> 
    <div class="col-md-6 row col-md-pull-1"> 

    Baylight Construction LLC 1022 boyle street 
    <br>Tel- (232)233-4323 Fax-(232)233-2323 

    </div> 
</div>