+ 2

I need help

Am working on a project in which I intend to put two links inside two different div tags. The problem is the div tags gets displayed inline and I don't want that. I want it displayed in a vertical sense with the link aligned midway in the div. Here is my sample code <div><a href="#" class="left">Animals</a></div> </div><a href="#" class="left">Sports</a></div> .left{ width:200px; height:100px; float:left; border-radius:12px; text-align:center;}

4th Sep 2017, 12:34 PM
Gad Patrick
Gad Patrick - avatar
3 Respuestas
+ 5
4th Sep 2017, 1:00 PM
Stoyan Todorov
Stoyan Todorov - avatar
+ 2
@Gad Patrick: You just doesn't need the 'float:left;' css property: that's why your <div>s are displayed inlined ;) @Ledio Deda: you should specify if you are talking to another one than the asker, else what you're talking about is not easily understandable ^^ (rather post on code comments in such case ;P)
4th Sep 2017, 3:38 PM
visph
visph - avatar
+ 1
Well, based on the lines of code shown there, there is a problem at third row (line 2): </div><a href....>Sports<... The "</div>" should be <div>, because you are opening tags and not closing them. Try it...
4th Sep 2017, 1:00 PM
Ledio Deda
Ledio Deda - avatar