Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS classes definition syntax

Posted on 2015-01-04
1
Medium Priority
?
84 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

718 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