|
This could be from a number of things:
Are any of the files on a share? If so, how long does it take to access the share in Explorer? There could be a whole pile of network problems that would slow this down.
How's your web server look? Can you access a static page on it in less than 30 seconds? There's also a whole pile of network issues that you could have there.
Are you getting any error messages? If something's throwing exceptions or timing out, that'll make things take a long time.
Do you have any VS plug-ins? If you're using VS SCM (source control), or something like ReSharper, that can often change how long it takes to load a project.
|
|
|
|
|
Hi guys, I'm finally getting my CSS and DIV's sorted - thanks!
I have one final DIV to sort out. As you helped me to do below my body contains a 800px wide centered DIV which is working great:
.Content {<br />
width:800px;<br />
margin:0px auto;<br />
text-align:left;<br />
font-family: verdana, arial, helvetica, sans-serif;<br />
font-size: 0.9em;<br />
color: #5f5bb2;<br />
padding:5px;<br />
border-style: solid;<br />
border-width: 2px;<br />
border-color: #5f5bb2;<br />
}
Within it there are 3 DIV's down the left hand side to form menu's, etc which are 200px wide. Also working great. However, I now want to fill the other 600px on the right with a DIV (obviously) and am having a small positioning problem. I am able to position it horizontally, but not vertically - it's currently sitting to the right, but below the bottom left hand DIV (screenshot here[^])
I can't use absolute positioning (due to the DIV setup discussed below which I'm loving) for the top, and as float is not used for vertical positioning I would be grateful for the opportunity to pick your brains again on how this is done.
I'm using the following so far:
.ContentRight{<br />
width: 570px;<br />
float: right;<br />
position: relative;<br />
background-color: #bbbbbb;<br />
text-align:left;<br />
font-family: verdana, arial, helvetica, sans-serif;<br />
font-size: 0.9em;<br />
color: #5f5bb2;<br />
padding:5px;<br />
}
Thanks!
A mum and loving it!
-- modified at 23:27 Thursday 1st June, 2006
|
|
|
|
|
You are just making them too big. Remember that the padding and the border are added to the size.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa, thanks again
My right hand div is 570px, left hand 200px, and the container div 800px. the border is 2px (so 8px), the padding 5px (so 20px) which is 28 - that should leave me 2px to spare? I tried being excessive and taking the right hand div down to 500px just to see what would happen - there's now an area of white space to the left of it, but it remains down the bottom. Is there something else I'm not taking into account?
Thanks again!
A mum and loving it!
|
|
|
|
|
According to the screen dump you posted:
The container is 815px.
The left hand div is 221px.
Container inner size: 815 - 4 - 10 = 801
Space beside the menu: 801 - 221 = 580
Right container: 570 + 4 + 10 = 584
There are four pixels too much.
If the right container doesn't fit even if you make it smaller, then you have something else that places it where it is.
I see that the menu and the right container are overlapping by a pixel. If they were floating beside each other they would never overlap.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
Thanks once again, I finally have it all positioned nicely and a return to some form of sanity is imminent .
I do have one last question if you don't mind? I have it working, but am not really 100% sure of what's going on - basically a lot of experimentation led to the solution. I didn't realise I could use top while using float and position: relative; but setting top: -570px; is what eventually worked - and keeps the DIV correctly positioned no matter how I resize my browser (which is what I wanted).
width: 580px;<br />
left: 0px; <br />
top: -570px;<br />
float: right;<br />
position: relative;
Is this a hack? I'd prefer to do it properly. Thanks again for your time.
A mum and loving it!
|
|
|
|
|
Yes, that's pretty much a hack. What you risk is that in some browsers it will work differently, and you end up with the content way off the screen. Have you tested it in different browsers?
Also it depends on the exact height of the menu. Have you specifided an absolute height, or does it just happen to be 570 pixels? If it's the later, that may very well change, for an example if you change the text size setting.
---
b { font-weight: normal; }
|
|
|
|
|
Megan Forbes wrote: I have it working, but am not really 100% sure of what's going on
What's going on (i'm guessing) is that you are including the DIVs in the wrong order. float will throw the element on which it's applied to the [left|right] of whatever follows it - but if you put it last, Bad Things Result. Think it looks odd in IE? Try it in Mozilla! So you want whatever DIVs you're float ing to come first, then the DIVs (or whatever) that you want them to float along side.
|
|
|
|
|
Aren't you sick of pixel calculations yet?
Just give the side bar a width and float it, and give the ContentRight DIV the same size and on the same side that you're floating the sidebar. That'll leave the rest of the space to the actual content, without having to calculate exactly how much space that is.
|
|
|
|
|
|
Thanks guys, it's all sorted! I'm really grateful for the help - and happy to have my page working without hacks .
Thanks again!
A mum and loving it!
|
|
|
|
|
Wow, this is a tough topic to find on the web that doesn't include third party control's. I need to generate a simple PDF document on the fly. When a user logs in and navigates to xxx.aspx I'd like the pdf to load in the browser. I need to generate the pdf based on the users data in the database and it needs to look like a sample pdf supplied by our design company. Does anyone have experience with something like this? I think I should be able to build a simple PDF with all .NET built in objects and without having to purchase third party tools. Any suggestions would be appreciated!
Thanks
"Half this game is ninety percent mental."
- Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
|
|
|
|
|
|
I m using british format date on client machines. The problem is that if any client have US format date then DateDiff funtion calculate wrong number of days.
Any idea please....... it is most urgent..
Know Yourself Then Grow Yourself.
|
|
|
|
|
|
I might possibly be able to help, however I will need more information:
1. What languages are you using?
2. What is the code supposed to do? You mentioned that it calculates the "wrong number of days". Can you share this section of the code, so I can see what you are working with?
3. How do you want the US date formatted (June 4, 2006, 06.04.2006, etc...) and how do you want the Brittish date formatted?
Note: I can't help you, at least someone else who can will have all the info that they need, however I will do my best to answer your question.
|
|
|
|
|
I have this simple page with 4 main DIV tags.
The first one should act as a header, and it must be 100% wide (with 4px left and right margins). The last one should act as a footer.
The other two should be placed between the "header" and "footer" DIVs, the first on the left and the second on the right of the page. The two must occupy the 100% of the page. In other words I need a DIV on the left for a menu and a wider div on the right for the contents. The "menu" DIV should be 180px wide.
I set the "menu" and "content" DIVs like this:
#SidebarDiv {
width: 180px;
float: left;
}
#MainDiv {
width: 78%;
float: left;
}
I used 78% because I want the DIVs occupying the whole page width. Obviously when the width of the browser increases, there is some blank space on the right of the "content" DIV. When it decreases the "content" div falls down, under the "menu" DIV.
So the question is: how can I make the two DIVs always occupy the whole page width, handling different window widths, all with CSS?
Thanks.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
This may not have the desired affect you want but it works in IE 6. These web sites might be helpful:
http://www.positioniseverything.net/[^]
http://www.webreference.com/authoring/style/sheets/layout/advanced/[^]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Div Demo</title>
<style type="text/css">
#SidebarDiv
{
position : absolute;
left : 0;
width : 180px;
margin-left : 10px;
margin-top : 0px;
color : #000000;
padding : 3px;
background-color: blue;
}
#MainDiv
{
top : 0px;
margin : 0px 25% 0 186px;
padding : 3px;
color : #000000;
background-color: red;
width: 78%;
}
</style>
</head>
<body>
<div id="SidebarDiv">
<table>
<tr>
<td>Side Bar</td>
</tr>
<tr>
<td>Side Bar</td>
</tr>
</table>
</div>
<div id="MainDiv">
<table>
<tr>
<td>Main Content</td>
<td>Main Content</td>
<td>Main Content</td>
<td>Main Content</td>
</tr>
<tr>
<td>Main Content</td>
<td>Main Content</td>
<td>Main Content</td>
<td>Main Content</td>
</tr>
</table>
</div>
</body>
</html>
|
|
|
|
|
Thanks for the links, George.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
Dario Solera wrote: #SidebarDiv {
width: 180px;
float: left;
}
#MainDiv {
width: 78%;
float: left;
}
Change #MainDiv to
{
margin-left: 180px;
} Should work better.
|
|
|
|
|
I don't know if I am the only one or not, but I don't understand what your question is? What are you trying to accomplish? If you give me more info as to your problem, I will do my best to help.
|
|
|
|
|
1.) I have a gridview
2.) when the page loads, it shows rows
3.) now, i should make the backcolor of the first row = blue, the last row = red...
4.) the rows in between them should be the gradient of blue and red (blend of blue down to red)
5.) i need the code (using a dynamic method to assign colors to the rows)
i've done it already with a filter but i was asked to do it by code.
thanks so much..
hope you can help me...
|
|
|
|
|
I've been developing websites this year using ASPNET in my computing course. What I have found to be the best is to have one Default.aspx page and have a placeholder inside. This placeholder is then loaded on Page_Load with a web control by reading the query string after default.aspx.
what do you think of this approach? I mean, it has worked for me by providing validators on each web user control to check the session (to deny acess when a user not logged in tries to enter member areas). but my lecturer has read somewhere that web developers frown on this kind of work?
what do you think? thanks
PS: I posted this here since I do not want actual ASPNET code... more like point of views.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
If your assignment specification(s) DO NOT forbid you from using the approach you made then that should be fine.
In any case, demand your lecturer provides you with evidence that web developers frown that kind of work, then you have the right to respond with alternate evidence.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I want to send some data from web form to a procedure, when a user click's on some table cells (APS Table) but asp.net table cells dont have any "OnClick event". How can i do this please?
Soroush Sarabi
|
|
|
|