Solved

CSS classes definition syntax

Posted on 2015-01-04
1
80 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use question mark (?) in filename with html 25 71
Hide cell in a table 2 26
Diminish Pop-up  in 3 seconds 7 44
Powershell script does not exit 4 22
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 is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

792 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