On 5/21/05, Richard Brown <[EMAIL PROTECTED]> wrote:
<...> 
> At the bottom of the page there is two lines in the footer. The top
> line (a search box) is meant to be centred, the bottom line is meant to
> be aligned to the right. I have entered the following code in the html:
> 
> <div id="footer" class="right">&copy; Keith Jones</div>
> 
> With this in the css:
> 
> #footer {
>         position: relative;
>         top: 0;
>         left: 0;
>         height: 60px;
>         margin: 0;
>         padding: 0;
>         text-align: center;
>         font-family: Verdana, Arial, Helvetica, sans-serif;
>         font-size: 12px;
> }
> 
> .right {
>         text-align: right;
> }
> 
> Can anybody explain what I am doing wrong please?
<...>

You have duplicated your id="footer" (id must be unique). 

Now both #footer and .right rules should apply to the same
element, and you have text-align:center for the #footer and
text-align:right for the
.right. #footer wins because of higher specificity.

Removing it from <div id="footer" class="right">&copy; Keith Jones</div>
should solve the problem.

Regards,
Rimantas 
http://rimantas.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to