SearchEngines.bg

Това е примерно съобщение за гост. Регистрирайте безплатен акаунт днес, за да станете потребител на SearchEngines.bg! След като влезете, ще можете да участвате в този сайт, като добавите свои собствени теми и публикации, както и да се свържете с други членове чрез вашата лична входяща кутия! Благодарим ви!

div в div да бъде дясно подравнен?

azsym

New member
Имам следното:

PHP:
<div id="site_content">
<div class="sidebar">
<div class="addthis_toolbox addthis_default_style addthis_32x32_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=дфдсфс"></script>

ДРУГ ТЕКСТ ТУКА.
</div>
</div>
като цсс-а e:

PHP:
#site_content
{
	width: 1100px;
	overflow: hidden;
	padding: 0px;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	background-color: #FFF;
	background-image: none;
	background-repeat: repeat-y;
} 

.sidebar
{
	float: right;
	width: 300px;
	text-align: right;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 30;
	font-size: 14px;
	color: #000000;
}

.sidebar ul
{ width: 178px; 
  padding: 4px 0 0 0; 
  margin: 4px 0 30px 0;}
.result {
	font-family: 'trebuchet ms', arial, sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: #000000;
	background-color: #E1E1E1;
	border: 1px solid #667F03;
	text-align: right;
}


.sidebar li
{ list-style: none; 
  padding: 0 0 7px 0; }

.sidebar li a, .sidebar li a:hover
{ padding: 0 0 0 40px;
  display: block;
  background: transparent url(link.png) no-repeat left center;} 

.sidebar li a.selected
{ color: #444;
  text-decoration: none;}

другия текст си излиза дясно подравнен, но аддис бутоните излизат ляво подравнени.

Как да го оправя?
 
Re: div в div да бъде дясно подравнен?

Това, което искаш да отиде на дясно го загради с един слой и му дай float:right.

доста съм бос с цсс - как се прави това?
 
Re: div в div да бъде дясно подравнен?

Така.

Имам следното:

PHP:
<div id="site_content">
<div id='levo'>
ДРУГ ТЕКСТ ТУКА.
</div>
<div class="sidebar">
<div class="addthis_toolbox addthis_default_style addthis_32x32_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=дфдсфс"></script>
</div>
</div>
като цсс-а e:

PHP:
#site_content
{
	width: 1100px;
	overflow: hidden;
	padding: 0px;
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	background-color: #FFF;
	background-image: none;
	background-repeat: repeat-y;
} 


div#levo{
   float: left;
   width: 720px;
   text-align: left;
}

.sidebar
{
	float: right;
	width: 300px;
	text-align: right;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 30;
	font-size: 14px;
	color: #000000;
}

.sidebar ul
{ width: 178px; 
  padding: 4px 0 0 0; 
  margin: 4px 0 30px 0;}
.result {
	font-family: 'trebuchet ms', arial, sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: #000000;
	background-color: #E1E1E1;
	border: 1px solid #667F03;
	text-align: right;
}


.sidebar li
{ list-style: none; 
  padding: 0 0 7px 0; }

.sidebar li a, .sidebar li a:hover
{ padding: 0 0 0 40px;
  display: block;
  background: transparent url(link.png) no-repeat left center;} 

.sidebar li a.selected
{ color: #444;
  text-decoration: none;}

другия текст си излиза дясно подравнен, но аддис бутоните излизат ляво подравнени.

Как да го оправя?
 

Горе