473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Master Page Content place holder and Cascading Style sheets

Hi All,

I'm relatively new to ASP.NET and Visual Web Developer 2008.
I'm using a Master page with one content place holder.
There is a Cascading Style Sheet file which is being refered by the master page file as follws
"<link href="myStyleSheet.css" rel="Stylesheet" type="text/css"/>"

Part of the Style sheet as follows:
Expand|Select|Wrap|Line Numbers
  1. .textbox
  2. {
  3.     background-color: #FF6600;
  4.     font-family: 'Book Antiqua';
  5.     position: absolute;
  6.     height: 18px;
  7.     width: 268px;
  8.     top: 664px;
  9.     left: 201px;
  10.  
Initially I didn't inserted the top and left style attributes, they came up once I created a textbox and assign the CssClass of it to "textBox"
Expand|Select|Wrap|Line Numbers
  1. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
  2.  
  3. <asp:TextBox ID="txtDesc" runat="server" CssClass="textbox"></asp:TextBox>
  4.  
  5. <asp:TextBox ID="txtRef" runat="server" CssClass="textbox"></asp:TextBox>
  6.  
  7. </asp:Content>
  8.  
---------------------------------------------------------------------------

When ever I put another textbox with same CssClass it appears exactly on top of the previous textbox. Basically both of them share the same top and left attributes and their values. So when ever I try to move the textbox (left and top values change automatically) only that one can be seen.

-----------------------------------------------------------------------------

Moreover If I put another dropdown list or text area they are attached with each other with white strip. (As in the attachment)

-----------------------------------------------------------------------------

My other problem is although I created the server controls in content place holder area they are moving towards left and display on left (When displaying on the browser)

Thnaks a lot, Any help really appriciated...............
Attached Images
File Type: jpg 1.jpg (14.8 KB, 661 views)
May 3 '09 #1
2 9602
Hamayun Khan
106 100+
Remove the below line from css class and check.
Expand|Select|Wrap|Line Numbers
  1.     position: absolute; 
  2.  
Instead u can use I think not must.
Expand|Select|Wrap|Line Numbers
  1.     position: relative;
  2.  
May 5 '09 #2
Frinavale
9,735 Expert Mod 8TB
Why are you positioning your TextBoxes as absolute anyways?

This will make them appear to be on top of the rest of the content.

You could use "relative" instead of "absolute" except that you're going to have the same problem because you're specifying the exact spot that the text box should be rendered.


Basically, with your current style, you are taking your text box out of the normal flow of the web page and placing it in a specific spot (664px from the top and 201px from the left).

Since you're applying this style to more than one text box it is drawing every text box at the same position.....it Should be doing this because this is what you are telling it to do.

What do you really want to do with the text boxes?

Do you want them to appear next to each other in a group and move the group to 664px from the top and 201px from the left?
Do you want them to appear under one another?
Do you want them to be grouped at all????

In regards to the rest of your content moving, it's probably because you're telling it to as well.....
May 5 '09 #3

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

Similar topics

5
by: JezB | last post by:
Is it possible to programatically examine and modify a page's Styles (including Cascading Style Sheets) within the code-behind-module (eg. c#) ? My guess is that since these are HTML elements the...
5
by: andchoi | last post by:
I must be the dumbest ASP.NET 2.0 developer, because despite many different attempts, I am unable to resize a content place holder in the master page... Can anyone clue me in? It seems that the...
5
by: Peter Walburn | last post by:
Hi, I am writing a web based application in VB.Net. A lot of the forms in the applicaiotn have grids (datagrids) in them. I would like to have a style sheet which defines how the headers are...
2
by: Brian | last post by:
Hello... I've created a master page in Visual Web Developer and it creates a content place holder. That's fine and all but I can't seem to resize it. Any suggestions? Thanks, Brian
1
by: lamuerte451 | last post by:
Hi: I am a newbie to asp.net 2.0 and am building an app with VS 2005 that will allow users to update records via the web. I have created a master page and then have placed Gridview and details...
5
by: MarkW | last post by:
I hope this is the correct place to post this: I am developing a web site for a e-commerce business I will be running. The site I'm setting up will be 50% store, 50% content. I'm not sure which...
0
by: Steve B. | last post by:
Hi, I'm building a web application that is based on contentplaceholders and master page. Each page has a central contentplaceholder where the business operation can be done. In the banner of...
4
by: Rene | last post by:
I have a master page where I would like to be able to resize the width of the ContentPlaceHolder. Once the Content Place Holder control has the with that I want, I don't want it to change even...
1
by: Mel | last post by:
How do I put my tree view control inside a content place holder? I drag it there but it doesn't seem to appear in the correct spot. P.S - I have a master page with a content section representing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.