• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Can't get rid of space between navbar and content

On this page http://leadinc.no/projects

I have set every tag to padding:0 margin:0 but there is the stubborn space between the content and the navbar. The green background of table#content should not show up between the pictures and the navbar (div.secondary).  

Also there's space between the pics (red background should not show) eventhough cell spacing and every conceivable class on td and table and img set to 0.

Can anyone please tell me whay these spaces persist? The top space is worse in Firefox.

The only CSS files are common.css and drupal.css.    style.css is empty and combined it into common.css, hence the double mention of some tags like body.

0
polaatx
Asked:
polaatx
  • 2
  • 2
  • 2
2 Solutions
 
JeffHowdenCommented:
Could it be the <br /> between <tbody> and <tr> and again between </tbody> and </table> ??
0
 
polaatxAuthor Commented:
Thank you Jeff. Turns out the textfield editor built into the admin pages of the site was rewriting my code and adding the tbody and br tags. It wasn't in the dreamweaver but when I copy/pasted into the textfield when I made the page online, it was rewritten.

I still have the problem with space between images. Any ideas?
0
 
JeffHowdenCommented:
I see that.  There are lots of potential causes.  Some of the big things I see is that you're using an XHTML Strict doctype, but have lots and lots of invalid HTML (not XHTML) tags in there.  Specifically, your <img> tags aren't closed properly (<img />).  Also, there are numerous tag attributes that are in mixed case (this is not allowed in XHTML).

http://validator.w3.org/check?uri=http%3A%2F%2Fleadinc.no%2Fprojects

The source of the problem is in comment.css though:

table#project_img {
width:755px;
background-color:#FF0000;
}

The width of the images (250px each) adds up to 750px, not 755px.

Also, I'd remove all the superfluous hspace and vspace attributes as the default is already 0.

0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
gonenraCommented:
i got a solution, at least locally it works:
in the css file:
http://leadinc.no/themes/chameleon/common.css
i added the line:
    height:35px;

to the class:
div.navlinks div.secondary {

the source:
div.navlinks div.secondary {
  padding: 0em;
  width:750px;
    margin: 0 auto;
               border-bottom:1px #ddd solid;
           border-right:1px #ddd solid;
               border-left:1px #ddd solid;
}

after my change:
div.navlinks div.secondary {
  padding: 0em;
  width:750px;
    height:35px;
    margin: 0 auto;
               border-bottom:1px #ddd solid;
           border-right:1px #ddd solid;
               border-left:1px #ddd solid;      
}

and the space is gone.

please try that and tell me how it went
0
 
gonenraCommented:
BTW, i'm working with FF, but i checked it on IE too
and it's not changing correctly (as expected\suspected).
when i put 25px it's a bit better then the original but it's still pretty spacy
under 25px you cant see a change in IE
and starting at 25px it's not showing correctly in FF

i wish someone will just shutdown MS !!!
0
 
polaatxAuthor Commented:
Gosh, I just realized I forgot to work on this issue. I will get back to you ASAP.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now