Domanda

The text that I have between my anchor tag is not showing up and I do not have any idea why. Can anyone help me out?

HTML:

<div id="left">
<a class="links" href="#footer">Yolo</a>
</div>    

CSS:

.links{
display:block;
width:100%;
height:30px;
border-bottom:2px solid orange;

padding:10px 0px;

color:red;

}


#left{


background-color:#320E7F;
position:relative;
right:85%;
top:120px;
height:1900px;
width:100%;
z-index:0;

}
È stato utile?

Soluzione

First, you have an unclosed attribute here: <div id="left>

Second, your rule right: 85%; pushes the div to the left, where your link is, so it's rendered out of the screen.

See it fixed here: http://jsfiddle.net/2cQx3/2/

Altri suggerimenti

Remove position:relative for div. You will be wanting this..

CSS

.links{
display:block;
width:100%;
height:30px;
border-bottom:2px solid orange;

padding:10px 0px;

color:red;

}
#left{ background-color:#320E7F;  right:85%; top:120px; height:1900px; width:100%; z-index:0; }

HTML

<div id="left">
<a class="links" href="#footer">Yolo</a>
</div>

http://jsfiddle.net/2cQx3/1/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top