Go Premium for a chance to win a PS4. Enter to Win

x
?
SolvedPrivate

Change css to remove extra spaces

Posted on 2015-02-15
10
Medium Priority
?
35 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
  • 6
  • 4
10 Comments
 
LVL 84

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
Industry Leaders: 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 84

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 84

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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
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…

824 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