SolvedPrivate

Change css to remove extra spaces

Posted on 2015-02-15
10
26 Views
Last Modified: 2016-02-25
I think the issue is with panel-body class.

This page looks fine. No extra spaces between the textboxes

http://stagingbd.com/office-name-add-a-branch.html

This is the one I'm working on based on that page above. I'm plugging it to .Net MVC code but I have extra spaces between the textboxes

http://stagingbd.com/Branch_New.html
0
Comment
Question by:Camillia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611438
Your second example references 'localhost' for all the files which of course are not on My 'localhost' but yours.  That means we can't see what your CSS and scripts are doing.
0
 
LVL 7

Author Comment

by:Camillia
ID: 40611458
Looked at it. Let me change that. I'll post again
0
 
LVL 7

Author Comment

by:Camillia
ID: 40611483
Here, this is the one that's needs the spaces be removed. I played around with "panel-body" and "form-group" and it's this combination that causes the extra space. "form-group" comes from bootstrap so I don't want to change that. I know I can override it.

http://stagingbd.com/beadynew.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611523
It looks like these two are your biggest problem.  The two of them combine for 45px of blank space.
.panel-body {
    padding: 15px;
}
.form-group {
    margin-bottom: 15px;
}

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611536
Yeah, there has to be some padding...that's why I have   <div class="form-group panel-body">

Now, If I remove "panel-body" from the first textbox, it looks like this...the padding is totally removed.

The thing is, there's  <div class="panel-body">  as top level...that should do the padding but it's not.

one css class removed
0
 
LVL 7

Author Comment

by:Camillia
ID: 40611539
I think I can remove  class="form-group panel-body"   totally and it looks correct.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611588
Probably.  I set the following to 1px in Firebug and it seems to work.
.form-horizontal .form-group {
    margin-left: 1px;
    margin-right: 1px;
}
.panel-body {
    padding: 1px;
}
.form-group {
    margin-bottom: 1px;
}

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611595
I thought I shouldn't be changing bootstrap CSS tags directly. I should create news ones to override them. At least, that's what a CSS guy said that my previous job.

I can try what you have.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40611614
Either method is fine.  You don't need to change them in 'bootstrap.css', just change them in that page in their own 'style' section that comes last after all the others and just before the </head> tag.
<style type="text/css">
<!--
.form-horizontal .form-group {
    margin-left: 1px;
    margin-right: 1px;
}
.panel-body {
    padding: 1px;
}
.form-group {
    margin-bottom: 1px;
}
 -->
</style>

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611621
thanks,I'll try
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question