starscape
starscape

Reputation: 2973

CSS/HTML - Text on drop down menu goes right even though I aligned it left

Picture of the problem I'm having below. I tried googling this but it was such a specific problem that I couldn't find anything helpful.

Picture (Sorry for using imgur, Stack overflow doesn't allow new users to embed pictures)

CSS:

#dropDown3 {position:absolute;
            top:130px;  
            left:860px;
            padding:15px;
            margin:0px;
            text-align:left;
            line-height:170%;
            width:40px;
            height:45px;
            display:none;
            background-color:#006bb2;
            border-radius:1px;
            z-index:2;}

My other two drop-downs are not having this problem. Any help is appreciated.

Upvotes: 1

Views: 2757

Answers (3)

keeg
keeg

Reputation: 3978

your text is left aligned, otherwise the t in Recent and the e in Archive would be aligned right but they are not, as Vucko said, don't move the element as far over to the left.

Upvotes: 0

atreju
atreju

Reputation: 477

The problem is your padding: You have 15px padding. So because there is too little space, the text appears more at the right side than at the left one.

Try either reducing your padding or set the width a bit larger.

I hope it helps...

Upvotes: 1

Bipin Chandra Tripathi
Bipin Chandra Tripathi

Reputation: 2620

Try

#dropDown3  li{
 text-align:left;
}

Upvotes: 0

Related Questions