SolvedPrivate

Change css to remove extra spaces

Posted on 2015-02-15
10
25 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 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
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.

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

839 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