Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get a border around a html div element

Tags:

html

css

border

I can't figure out why I can't get a border around my div here. My jsfiddle is:

http://jsfiddle.net/4HnKs/1/

I must just be crazy from staring at my computer screen but if you look at the class verticalmembersmenu in the CSS, I can't for the life of me figure out why I can't get the border around the div.

like image 705
MillerMedia Avatar asked Jan 10 '12 04:01

MillerMedia


2 Answers

u can give inline style to div as

 <div class="verticalmembersmenu" style = "border:1px solid black;">

or

.verticalmembersmenu ul{
list-style:none; border:1px solid black;
}
like image 62
reshma k Avatar answered Oct 04 '22 17:10

reshma k


You are using HTML style comments in your CSS, that seems to be breaking the rendering, take a look at http://jsfiddle.net/4HnKs/3/

Some info on comments over at http://www.w3.org/TR/CSS2/syndata.html#comments

like image 34
leopic Avatar answered Oct 04 '22 18:10

leopic