views:

222

answers:

4

In my site I added google friend connect. Now on the right where the sidebar is, there is a small line. How do I remove the line because I dont want it there.

+4  A: 

Can you just hide the second <div id="sidebar"> it doesn't look like that needs to be visible, so hiding that element would hide the inner generated <div> that has the border on it.

Also, you should not have two elements on a page with the same id. I see there are two <div id="sidebar"> elements. So if you set CSS on one by id, it will affect the other also.

You should create your second <div> like this:

<div id="sidebar2" style="display:none"></div>

Or better yet, create a CSS rule for it:

#sidebar2{display:none;}

<div id="sidebar2"></div> 

EDIT: You know looking at it a little closer I don't even think you need that whole second <div id="sidebar">. Is that intentional? It looks like you only need to include the Google Friend Connect script once.

jaywon
Thanks. I just forgot to remove that when I was moving it up the page. Should I be replacing some of the id's with classes because there are parts of the site with multiple same ids.
Neb
If all divs on a page or inside a parent element would share a similar style make a class for them. It is okay to use the same id's in different places throughout the site, but make sure you don't have two of the same id's on the same page. Lots of postings on that topic on SO though, here is a good start: http://stackoverflow.com/questions/84378/div-class-vs-id
jaywon
+1  A: 

The small line is in the second sidebar div, I guess you should remove the second one, because it's exactly the same. The two sidebar divs have the same id, that's not allowed in HTML, id's should be unique on each page. That's why you don't see the friend connect thing twice.

GuidoH
A: 

Somewhere in source code you have this line causing that border there:

<div style="width: 276px; border: 1px solid rgb(136, 135, 134);" id="div-4699129216425402507"></div>

You may want to remove it in order to remove that border (line).

Sarfraz
A: 

Hm, just try removing the second <div id="sidebar">...</div>. This one causes the grey line - and it'll be causing lots of xhtml errors because some IDs (which are to be unique by definition) exist more than once in your markup.

dhh