|
Hi there,
I have a div in which I'd like to have a couple of floating divs. My problem is, the outer div has a border. But the border does not wrap around the floating divs inside. What am I doing wrong?
a simple example:
<div class="outer">
<div class="inner">box 1</div>
<div class="inner">box 2</div>
<div class="inner">box 3</div>
</div>
.outer {border:solid 1px #000;}
.inner {float:left; width:50px;}
Can anyone help? Please note that I do not want to specify a width for the outer div, since it should fill whatever it is placed in.
Thanks in advance!
Matthias
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
As the outer element doesn't have any non-floating elements in it, there is nothing that gives it height.
Add a <div class="Clear"></div> as the last element in the outer div. Add a style:
.Clear { clear: both; height: 0; overflow: hidden; }
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi
Am I thinking about moving towards Stored procedures for my database access, problem is that people have mixed opininions and contriditory optinions about using stored procedures. because when you google for asp.net speed you find loads of atricles even posed in VS magazine stating you should use stored procedures, but when you go to http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx[^]
you ind that stored procedures shouldnt be used, I just need to be 100% sure before I move on a pull apart my entire cms that stored procedures should be used.
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|
|
This can be an endless discussion.
I use SPs in 99% of cases. I believe that they make sense when talking about application organization and layering.
This is the main point.
|
|
|
|
|
Chona1171 wrote: you ind that stored procedures shouldnt be used, I just need to be 100% sure before I move on a pull apart my entire cms that stored procedures should be used.
There are no real definitions available, as said in the previous post, it's a endless story. I too use stored procedures in my application and felt very comfortable with it. Main advantage I felt was re usability and easy to maintain.
It's like a separation of back end logic from front end. It's good when you write long Transact SQL queries. You can avoid appending all these into a string and passing from page.
Since there won't be much performance difference for both methods, why you are afraid to use it ?
|
|
|
|
|
Stored procs always make for cleaner code, and give you far more power over securing your DB. There was a time when it was also regarded that they were a lot faster, but nowadays that advantage is debatable. I've never seen anyone claim that procs are slower, and that link is not claiming that, it's claiming they are not faster. I accept that. However, stored procs simply *force* the issue of making all your data code in one place. Frans Bouma is plain wrong, as far as I am concerned. In his hands, dynamic SQL may be easier to work with, but in most people's hands, it's a recipe for insecure spaghetti code. I'd rather advocate a practice that tends to good code, than one that ( perhaps ) tends to ease of use.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
That was great, Christian. But still I am in a confusion on the caching of execution plan. Link say's both the methods will cache the query ? What do you think ?
|
|
|
|
|
Yes, as I said, I've heard several people say that procs are not faster anymore, and I believe them. In any case, given how fast our PCs are, how often do you write SQL where the speed is a real advantage ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: how often do you write SQL where the speed is a real advantage ?
I always thinks about the speed. Our server is getting plenty of requests in one second. So the method what we use to fetch data should be the best.
|
|
|
|
|
If you run the same query as a stored procedure and a text query, you will most likely find that the speed difference is so small that you can't even reliably measure it.
What matters most is how you construct the query, so that you avoid expensive operations, and that you have created indexes for the correct fields.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Chona1171 wrote: problem is that people have mixed opininions and contriditory optinions about using stored procedures.
Of course they have. People have contradicting opinions about everything from application architecture to placing of brackets. Stored procedures is not an exception.
Chona1171 wrote: when you go to http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx you ind that stored procedures shouldnt be used
There are a lot of arguments there why stored procedures aren't better than dynamic queries, but that does neither make dynamic queries better nor stored procedure bad.
They are simply different approaches, so they have different strengths and weaknesses.
I prefer stored procedures, because:
:: The queries gets separated from the code. Things that has different purposes often benefit from being separated.
:: There is a well defined interface between the stored procedure and the code that is using it.
:: The execution plan of a stored procedure is always the same, so you know that they cache well. The execution plan of a dynamic query can change in ways that is hard to predict. It's easy to try out a stored procedure to see the execution plan, but not as easy to try out every possible dynamic query that the code can create.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hello everyone, am new to visual web developer. am using vb.net and i have AJAX control toolkit installed. Am developing a website and would like to make menus that bring out their contents once you hover on them, like the way menus on www.microsoft.com website are.
Thanks for the assistance, anyone will render.
Chrismitchel
|
|
|
|
|
Unless the AJAX toolkit offers such a menu ( and I don't see why it should, a menu is not an AJAXy thing ), you will need to find a third party DHTML menu and integrate it into your project.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks a lot Christian, but are you sure you cant recommend a third party DHTML menu creator that I can use? hopefully a free download
Chrismitchel
|
|
|
|
|
I know there's tons of free downloads. I am using none of them If I were, I would have gladly recommended based on my experiences.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
is it possible to record inside a web application the input from the microphone and send this data to the web server? Maybe with adobe flash or a java applet? Has anybody created something like this?
Thanks
Roland
|
|
|
|
|
Yes, it's sure possible with a .NET or Java plug in. Not sure about flash. I've not done it, no
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi... we need a component/script that will do a bandwidth speed test on a closed network. That is, the client PCs having their bandwidth speed tested will not have access to the Internet, only to the server that the test should be run against. Component/script can be Javascript, ASP, ASP.NET, ActiveX, Flash; no PHP or CGI or any other scripting language. Of course a free component/script is optimal, but the budget might support something inexpensive.
Any ideas? Thanks... Steve
|
|
|
|
|
It shouldn't be that hard to build one in-house.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I am adding a table dynamically using c# as below:-
productCell = new TableCell();
KSSCheckBox checkBox = new KSSCheckBox();
checkBox.ID = string.Format("CheckBox|{0}|{1}", x, product.OwnProductUID);
checkBox.Description = "Update";
checkBox.Checked = false;
checkBox.Attributes.Add("onClick", "HighLightCell();");
productCell.Controls.Add(checkBox);
productRow.Cells.Add(productCell);
When the user clicks the CheckBox I have to call a JS function which will highlight the table cell, and then do the reverse if the user unclicks the box again.
Trouble is I'm new to Javascript & dont really know where to start, have read plenty of examples on the Web but all of these are adding the code in the front end pages - I want to add this in code behind window.
I am including a .js in the page.aspx, which contains:-
function HighlightCell(cell)
{
Cell.style.backgroundColor = "#E0E0E0";
}
But this never gets fired when I click the check box?
Any help will be appreciated.
Thx
Janet
-- modified at 10:55 Tuesday 16th October, 2007
Lady Programmers are a rare breed!
|
|
|
|
|
It looks like there are 2 problems with your code.
But_Im_a_Lady wrote: checkBox.Attributes.Add("onClick", "HighLightCell();");
Your call to HighLightCell should pass a single argument representing a reference to the cell to update. This should read something like
checkBox.Attributes.Add("onClick", String.Format("HighLightCell({0});", ProductCell.ClientID));
But_Im_a_Lady wrote: function HighlightCell(cell)
{
Cell.style.backgroundColor = "#E0E0E0";
}
JavaScript is case-sensitive. You should change Cell to cell otherwise the interpreter won't know what is being referred to here.
Paul Marfleet
|
|
|
|
|
Hi
I have a hard time changing my generated xml content from "UTF-8" to "ISO-8859-1".
Is there a way in code behind to change it ?
Example:
hifiger2004
|
|
|
|
|
You will have to re-post with the Ignore HTML tags check box check since we can't see your example code. If you are serializing objects to get your XML (which I hope you are) you can set the encoding before you serialize to whatever encoding you want. Just make sure that whatever is de-serializing the xml is using the same encoding or you will have problems.
By the way to get the encodeing:
Encoding.GetEncoding("iso-8859-1")
So then you just need to set your encoding on your serialization object. That is slightly different based off which version of .net you are using and how you are serializing your objects.
Ben
-- modified at 9:49 Tuesday 16th October, 2007
|
|
|
|
|
This is my sample code:
Dim settings As New XmlWriterSettings()
settings.Indent = True
settings.NewLineOnAttributes = True
Using writer As XmlWriter = XmlWriter.Create("C:\xmlfile.xml", settings)
writer.WriteStartDocument()
writer.WriteStartElement("MYXML")
writer.WriteStartElement("PART1")
writer.WriteStartElement("Action")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test1")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test2")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test3")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Flush()
End Using
hifiger2004
|
|
|
|
|
So it is easy then. Just add
settings.encoding = Encoding.GetEncoding("iso-8859-1")
Ben
|
|
|
|