473,507 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get rid of white space with the <br /> when the buttons visibility is off

15 New Member
I have 4 buttons on the start page. The first and last button are set to visible and the two middle buttons are set to false visibility.

Expand|Select|Wrap|Line Numbers
  1. <asp:Button ID="btnviewtracks" class="button_schedcontinue" Visible="true" runat="server" Text="View Tracks >>" /><br />
  2.  
  3.              <asp:Button ID="btnRequestClass" class="button_schedcontinue" runat="server" Visible="False" Text="Update Status" AutoPostBack="True" /> <br />
  4.  
  5.              <asp:Button ID="btnviewclass" class="button_schedcontinue" Visible="false" runat="server" Text="View All Classes >>" /> <br />
  6.  
  7.              <asp:Button ID="btninstructor" class="button_schedcontinue" Visible="true" runat="server" Text="Instructor Page >>" />
  8.  

My problem is that their is white space between the first and last button because of the <br / > that are after the two middle buttons that are invisible. Is there any other way of doing this without using a table?
Sep 22 '08 #1
3 1328
DrBunchman
979 Recognized Expert Contributor
Hi firebirds98,

You've posted your question in the ASP Forum which is for Classic ASP only - I've moved it for you but in future please post all ASP.NET questions in the .NET Forum.

Why can't you just remove the break tags if you don't want them to affect your layout?

Dr B
Sep 22 '08 #2
balabaster
797 Recognized Expert Contributor
Hi firebirds98,

You've posted your question in the ASP Forum which is for Classic ASP only - I've moved it for you but in future please post all ASP.NET questions in the .NET Forum.

Why can't you just remove the break tags if you don't want them to affect your layout?

Dr B
Assuming that the visibility of your buttons is set in the codebehind, wrap the buttons in a span and rather than setting the visibility of your buttons to false, set the visibility of the span to false...and hence your <br />s will no longer be displayed.
Sep 22 '08 #3
Plater
7,872 Recognized Expert Expert
If your buttons are hidden visibility:hidden and you want the space they occupy removed as well, try display:none
Edit: Nevermind, I see what was wrong now. Your issue was with the extra <br/>s that are still there. Just listen to balabaster then
Sep 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
7837
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my...
6
12140
by: Lasse | last post by:
I have done this simple function, it seems to work as intended, to solve a problem i have had for a while. I couldnt find any sample around that was working for me. I would like to test it with...
7
19091
by: noor.rahman | last post by:
I have an XML file that stores data from an HTML form. I use XSL to display the data in HTML format. The data may have newline characters. However, XSL is not displaying the newlines properly in...
2
2250
by: Coco | last post by:
i'm creating my xml programatically and adding the elements i'm having a problem keeping my space when trying to assign innertext to the elements i've just created. how do i solve it thanks!
7
2732
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
2
2520
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
1
3158
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
3
3346
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
7
3596
by: Nathan Sokalski | last post by:
Something that I recently noticed in IE6 (I don't know whether it is true for other browsers or versions of IE) is that it renders <br/and <br></br> differently. With the <br/version, which is what...
0
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7030
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.