Solved

CSS classes definition syntax

Posted on 2015-01-04
1
78 Views
Last Modified: 2015-01-04
Please explain differences between these two classes.

.user-login {
  position: absolute;
  top: 40px;
  right: 0;
  #display: none;
  text-align: right;
}
.user-login a {
  display: block;
  margin: 0 0 4px 0;
}

Open in new window


Html code
<div class="user-login">
				<a href="/under-construction.html" class="login">Daxil Ol</a>
				<a href="/new-register" class="register">Qeydiyyat</a>
</div>

Open in new window

0
Comment
Question by:Nusrat Nuriyev
1 Comment
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40530925
The second applies to anchors <a> inside an element with 'user-login' class.

Note that using 'absolute' position will cause all instances of that class to show in the exact same position on the page.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Width of Page is Affecting Side Menu 6 25
How to make a moving character 3 57
SlickNav Menu Plugin Not appearing on mobile 6 34
Box Locations 6 16
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question