|
Hi,
Yes, you can do this:
You need to define a class for your navbar, and add your styles to this class.
So, in your CSS, add:
.navbar
{
background: #5f5bb2;
}
.navbar a
{
color:White;
}
.navbar a:hover
{
color: Yellow;
}
And then just set the class of you navbar div in your HTML:
<div class="navbar"> Put your links here </div>
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
Thanks Nicholas! And nice to meet you
A mum and loving it!
|
|
|
|
|
Any one have decent code to do smooth scrolling of the scrollbar (vertically) that can also slow down when it reaches its near its destination? Im scrolling to a DIV object that is absolute positioned.
Thanks.
-- modified at 13:06 Saturday 3rd June, 2006
|
|
|
|
|
Hello!
I would like to know if it is currently possible to send a text message to msn messenger over a web site?
Is there such interface?
Thanks!
|
|
|
|
|
Yes, but it's not part of the framework. Look on SourceForge for MSN Messenger projects. There are open source components that allow sending.
|
|
|
|
|
How can i make an FTP Connection from an ASP page to a FTP Server???
To make the connection uid/pwd will be accepted from user, if the user account is existing connect user to FTP server else error msg should be returned??? After making connection all task like Listing of Directory , renaming files, deletion, etc-2 should be possible. I dont want to buy any tool or utility or any trial versions of FTP tools. Reply soon.
Rooby
|
|
|
|
|
I want to scroll the browser to last position.
Then before I scroll I have to save the position of the window of browser.
How to get the position?
Thank you.
|
|
|
|
|
Hello
I have a webproject I recently set up on a new comp. I made a virtual directory for the client project and started the solution. Now it takes 5-6 minutes for the studio just to open all the projects. Does anyone have an idea of why this might be?
/regards
|
|
|
|
|
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
|
|
|
|