Search Results

Search found 30326 results on 1214 pages for 'html encode'.

Page 84/1214 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Custom HTML Helpers in ASP.NET MVC 2

    - by Interfector
    Hi, I want to create a pagination helper. The only parameters that it needs are currentpage, pagecount and routename. However, I do not know if it is possible to use the return value of another html helper inside the definition of my html helper. I am referring specifically to Html.RouteLink. How can I go about doing something like this in the class definition using System; using System.Web.Mvc; namespace MvcApplication1.Helpers { public static class LabelExtensions { public static string Label(this HtmlHelper helper, string routeName, int currentpage, int totalPages) { string html = ""; //Stuff I add to html //I'd like to generate a similar result as the helper bellow html .= Html.RouteLink( pageNo, routeName, new { page = pageNo - 1 } ); //Other stuff I do the html return html; } } } Thank you.

    Read the article

  • Encode audio to aac with libavcodec

    - by ryan
    I'm using libavcodec (latest git as of 3/3/10) to encode raw pcm to aac (libfaac support enabled). I do this by calling avcodec_encode_audio repeatedly with codec_context-frame_size samples each time. The first four calls return successfully, but the fifth call never returns. When I use gdb to break, the stack is corrupt. If I use audacity to export the pcm data to a .wav file, then I can use command-line ffmpeg to convert to aac without any issues, so I'm sure it's something I'm doing wrong. I've written a small test program that duplicates my problem. It reads the test data from a file, which is available here: http://birdie.protoven.com/audio.pcm (~2 seconds of signed 16 bit LE pcm) I can make it all work if I use FAAC directly, but the code would be a little cleaner if I could just use libavcodec, as I'm also encoding video, and writing both to an mp4. ffmpeg version info: FFmpeg version git-c280040, Copyright (c) 2000-2010 the FFmpeg developers built on Mar 3 2010 15:40:46 with gcc 4.4.1 configuration: --enable-libfaac --enable-gpl --enable-nonfree --enable-version3 --enable-postproc --enable-pthreads --enable-debug=3 --enable-shared libavutil 50.10. 0 / 50.10. 0 libavcodec 52.55. 0 / 52.55. 0 libavformat 52.54. 0 / 52.54. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 libpostproc 51. 2. 0 / 51. 2. 0 Is there something I'm not setting, or setting incorrectly in my codec context, maybe? Any help is greatly appreciated! Here is my test code: #include <stdio.h> #include <libavcodec/avcodec.h> void EncodeTest(int sampleRate, int channels, int audioBitrate, uint8_t *audioData, size_t audioSize) { AVCodecContext *audioCodec; AVCodec *codec; uint8_t *buf; int bufSize, frameBytes; avcodec_register_all(); //Set up audio encoder codec = avcodec_find_encoder(CODEC_ID_AAC); if (codec == NULL) return; audioCodec = avcodec_alloc_context(); audioCodec->bit_rate = audioBitrate; audioCodec->sample_fmt = SAMPLE_FMT_S16; audioCodec->sample_rate = sampleRate; audioCodec->channels = channels; audioCodec->profile = FF_PROFILE_AAC_MAIN; audioCodec->time_base = (AVRational){1, sampleRate}; audioCodec->codec_type = CODEC_TYPE_AUDIO; if (avcodec_open(audioCodec, codec) < 0) return; bufSize = FF_MIN_BUFFER_SIZE * 10; buf = (uint8_t *)malloc(bufSize); if (buf == NULL) return; frameBytes = audioCodec->frame_size * audioCodec->channels * 2; while (audioSize >= frameBytes) { int packetSize; packetSize = avcodec_encode_audio(audioCodec, buf, bufSize, (short *)audioData); printf("encoder returned %d bytes of data\n", packetSize); audioData += frameBytes; audioSize -= frameBytes; } } int main() { FILE *stream = fopen("audio.pcm", "rb"); size_t size; uint8_t *buf; if (stream == NULL) { printf("Unable to open file\n"); return 1; } fseek(stream, 0, SEEK_END); size = ftell(stream); fseek(stream, 0, SEEK_SET); buf = (uint8_t *)malloc(size); fread(buf, sizeof(uint8_t), size, stream); fclose(stream); EncodeTest(32000, 2, 448000, buf, size); }

    Read the article

  • Is there a better approach to minify html generated from aspx page

    - by Hoque
    I am using the following code to minify html generated from aspx page duuring runtime. protected override void Render(HtmlTextWriter writer) { TextWriter output = new StringWriter(); base.Render(new HtmlTextWriter(output)); String html = output.ToString(); html = Regex.Replace(html, @"\n|\t", " "); html = Regex.Replace(html, @">\s+<", "><").Trim(); html = Regex.Replace(html, @"\s{2,}", " "); writer.Write(html); } Is there more better approach to do the same. Thank you so much.

    Read the article

  • How to encode cyrillic in mysql?

    - by Premke
    Hello fellows, what's up? :-) I have one problem and i hope you can help me with it. One friend of mine have a simple solid html website and i implemented little php; CRUD system for articles... problem i came across is placing and getting cyrillic characters from mysql database. What i want to achive is next: In the main navigation there are some separated sections, whose names, ids and item's order i want to place in mysql and than to pull names and to put each name as a link. Names are supposed to be cyrillic characters. The problem comes when i, using php mysql_fetch_assoc function, try to display names which are inserted with cyrillic characters in database row, collation of row is utf8_general_ci, and i end with ????? insted of original characters. If i submit cyrillic characters via submit form to mysql it shows something like this У. How can i solve this, thanks in advance!? :-)

    Read the article

  • How to create public html (apache2) with LDAP authentication?

    - by borjamf
    Im running Apache2 on Ubuntu 12.04 Server because I want to create a home directory for each ldap user. I'm using LDAP for authentication and it's working ok. Also I've done some tests with LDAP module for Apache2 and it's working ok. The problem with this LDAP authentication is that any success login can access to ~user/public_html, even if the user is not the owner of that home. I dont know how to control that, for example, userldap2 access to userldap1/public_html. I want that only the userldap1 access to userldap1. Could anybody tell me how to control that with LDAP authentication? I hope that you'll understand me. My config (auth_ldap.conf) <Directory /home/disco2/*/public_html> AuthName "Authentication" AuthType basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthLDAPURL ldap://prueba.borja/dc=prueba,dc=borja?uid? Require ldap-filter objectClass=posixAccount </Directory>

    Read the article

  • Does the upload file INPUT HTML element give any personal information away?

    - by Senseful
    I'm wondering what personal information the file input (<input type="file">) element gives the website. I noticed that it does show the file name and the website does seem to have access to it. What about the file's path? If the file is located in My Documents, they could find out the user name via the path (e.g. C:\Documents and Settings\Bob\My Documents) which many times is the actual user's name that is using the website. What information do most modern browsers allow the website to access when a user uses the file input element? Could JavaScript somehow be used to gain more information? What about when plugins (such as Flash or Java) implement file uploading?

    Read the article

  • Why does loading a html page opens automaically the printer dialog?

    - by Alex
    I have the problem that loading a certain webpage in firefox automatically opens the printer dialog. How is that? Additional information: This only happens on firefox 24.0 on Windows 7. It neither happens on Windows Explorer in Windows 7 nor on Firefox 24 on a Linux system. This also happens when using the firefox safemode, with all add-ons disabled. I cannot post the webpage, since it is not public and restricted. Multiple javascript files are used, but none contains the expression print(). The page content does not contain the phrase 'printer'. It has nothing to do with printing something. This happens sometimes, but not always. I cannot say for sure the URL and/or the content is always identical. I can answer any other questions, like 'Does the page contain this and that...', 'does the URL contain this and that...' Basic question: What could be the reason for the annoying printer pop up?

    Read the article

  • Html.ValidationSummary and Multiple Forms

    - by MightyZot
    Originally posted on: http://geekswithblogs.net/MightyZot/archive/2013/11/11/html.validationsummary-and-multiple-forms.aspxThe Html.ValidationSummary helper writes a div with a list of general errors added to the model state while a request is being serviced. There is generally one form per view or partial view, I think, so often there is only one call to Html.ValidationSummary in the page resulting from the assembly of your views. And, consequently, there is no problem with the markup that Html.ValidationSummary spits out as a result. What if you want to put multiple forms in one view? Even if you create a view model that’s an aggregate of the view models for each form, the error validation summary is going to contain errors from both forms. Check out this screen shot, which shows a page with multiple forms. Notice how the error validation summary shows up twice. Grrr! Errors for the login form also show up in the registration form. Luckily, there is an easy way around this. Pull the errors out of the model state and separate them for each form. You’ll need to identify the appropriate form by setting the key when you make calls to ModelState.AddModelError. Assume in my example that errors for the login form are added to model state using the “LoginForm” key. And, likewise, assume that errors for the registration form are added to model state using the “RegistrationForm” key. An example of that might look like this… // If we got this far, something failed, redisplay form ModelState.AddModelError("LoginForm", "User name or password is not right..."); return View(model); Over in the code for your View, you can pull each form’s errors from the model state using lambda expressions that look like these… var LoginFormErrors = ViewData.ModelState.Where(ms => ms.Key == "LoginForm"); var RegistrationFormErrors = ViewData.ModelState.Where(ms => ms.Key == "RegistrationForm"); Now that you have two collections containing errors, you can display only the errors specific to each form. I’m doing that in my code by removing the calls to Html.ValidationSummary and replacing them with enumerators that look like this… if(LoginFormErrors.Count() > 0) { <div class="cdt-error-list">     <ul>     @foreach (var entry in LoginFormErrors)     {         foreach (var error in entry.Value.Errors)         {             <li>@error.ErrorMessage</li>         }     }     </ul> </div> } …and for the registration form, the code looks like this… @if(RegistrationFormErrors.Count() > 0) { <div class="cdt-error-list">     <ul>     @foreach (var entry in RegistrationFormErrors)     {         foreach (var error in entry.Value.Errors)         {             <li>@error.ErrorMessage</li>         }     }     </ul> </div> } The result is a nice clean separation of the list of errors that are specific to each form. And, this is important because each form is submitted separately in my case, so both forms don’t generate errors in the same context. As you’ll see in the screen shot below, errors added to the model state when the login form is submitted do not show up in the registration form’s validation summary.

    Read the article

  • HTML, JavaScript, and CSS in a NetBeans Platform Application

    - by Geertjan
    I broke down the code I used yesterday, to its absolute bare minimum, and then realized I'm not using HTML 5 at all: <html> <head> <link rel="stylesheet" href="style.css" type="text/css" media="all" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> <script type="text/javascript" src="script.js"></script> </head> <body> <div id="logo"> </div> <div id="infobox"> <h2 id="statustext"/> </div> </body> </html> Here's the script.js file referred to above: $(function(){ var banana = $("#logo"); var statustext = $("#statustext"); var defaulttxt = "Drag the banana!"; var dragtxt = "Dragging the banana!"; statustext.text(defaulttxt); banana.draggable({ drag: function(event, ui){ statustext.text(dragtxt); }, stop: function(event, ui){ statustext.text(defaulttxt); } }); }); And here's the stylesheet: body { background:#3B4D61 repeat 0 0; margin:0; padding:0; } h2 { color:#D1D8DF; display:block; font:bold 15px/10px Tahoma, Helvetica, Arial, Sans-Serif; text-align:center; } #infobox { position:absolute; width:300px; bottom:20px; left:50%; margin-left:-150px; padding:0 20px; background:rgba(0,0,0,0.5); -webkit-border-radius:15px; -moz-border-radius:15px; border-radius:15px; z-index:999; } #logo { position:absolute; width:450px; height:150px; top:40%; left: 30%; background:url(bananas.png) no-repeat 0 0; cursor:move; z-index:700; } However, I've replaced the content of the HTML file with a few of the samples from here, without any problem; in other words, if the HTML 5 canvas were to be needed, it could seamlessly be incorporated into my NetBeans Platform application: https://developer.mozilla.org/en/Canvas_tutorial/Basic_usage

    Read the article

  • Preview hidden options on web sites

    - by veili_13
    I want to have hidden options on my web site and be previewed only when the user chooses. I want to animate them from left and right (about 15%). At the moment I have them visible in my html but with width set at 0 and animate it at 15%. In these containers are many options which should disappear to the left/right (with slide effect). But I am not so sure that having all of this in my HTML so I am thinking to create them with jQuery, with 0 width and animating it to it's should be width and setting the other elements to 0 width. Is this approach good, or should I create them and hide the overflow so I would animate position. Or is there a better approach ??

    Read the article

  • How to retrieve value from DropDownListFor html helper in ASP>NET MVC2?

    - by Eedoh
    Hello I know there was few similar questions here about DropDownListFor, but neither helped me... I use Entity Framework as ORM in my project. There's EF model called "Stete". Stete has Foreign on EF model called "Drustva" Now I'm trying to make a form for editing the data, for Stete model. I managed to display everything, including Stete.Drustva.Naziv property, but I can't get this last property in my handler method [HttpPost]. It always return 0, no matter what I select in drop down list. Here's the code: DrustvaController: public static IEnumerable<SelectListItem> DrustvaToSelectListItemsById(this KnjigaStetnikaEntities pEntities, int Id) { IEnumerable<Drustva> drustva = (from d in pEntities.Drustva select d).ToList(); return drustva.OrderBy(drustvo => drustvo.Naziv).Select(drustvo => new SelectListItem { Text = drustvo.Naziv, Value = drustvo.Id.ToString(), Selected = (drustvo.Id == Id)? true : false }); } SteteController: private IEnumerable<SelectListItem> privremenaListaDrustava(int Id) { using (var ctx = new KnjigaStetnikaEntities()) { return ctx.DrustvaToSelectListItemsById(Id); } } public ActionResult IzmijeniPodatkeStete(Int32 pBrojStete) { PretragaStetaModel psm = new PretragaStetaModel(); ViewData["drustva"] = privremenaListaDrustava(psm.VratiStetuPoBrojuStete(pBrojStete).Drustva.Id); ViewData.Model = new Models.Stete(); return View("EditView", (Stete.Models.Stete)psm.GetSteta(pBrojStete)); } EditView: <div class="editor-label"> <%: Html.Label("Društvo") %> </div> <div class="editor-field"> <%: Html.DropDownListFor(m => m.Drustva.Naziv, ViewData["drustva"] as IEnumerable<SelectListItem>) %> <%: Html.ValidationMessageFor(model => model.FKDrustvo) %> </div> I am sorry for not translating names of the objects into english, but they hardly have appropriate translation. If necessary, I can try creating similar example...

    Read the article

  • How to retrieve value from DropDownListFor html helper in ASP.NET MVC2?

    - by Eedoh
    Hello I know there was few similar questions here about DropDownListFor, but neither helped me... I use Entity Framework as ORM in my project. There's EF model called "Stete". Stete has Foreign on EF model called "Drustva" Now I'm trying to make a form for editing the data, for Stete model. I managed to display everything, including Stete.Drustva.Naziv property, but I can't get this last property in my handler method [HttpPost]. It always return 0, no matter what I select in drop down list. Here's the code: DrustvaController: public static IEnumerable<SelectListItem> DrustvaToSelectListItemsById(this KnjigaStetnikaEntities pEntities, int Id) { IEnumerable<Drustva> drustva = (from d in pEntities.Drustva select d).ToList(); return drustva.OrderBy(drustvo => drustvo.Naziv).Select(drustvo => new SelectListItem { Text = drustvo.Naziv, Value = drustvo.Id.ToString(), Selected = (drustvo.Id == Id)? true : false }); } SteteController: private IEnumerable<SelectListItem> privremenaListaDrustava(int Id) { using (var ctx = new KnjigaStetnikaEntities()) { return ctx.DrustvaToSelectListItemsById(Id); } } public ActionResult IzmijeniPodatkeStete(Int32 pBrojStete) { PretragaStetaModel psm = new PretragaStetaModel(); ViewData["drustva"] = privremenaListaDrustava(psm.VratiStetuPoBrojuStete(pBrojStete).Drustva.Id); ViewData.Model = new Models.Stete(); return View("EditView", (Stete.Models.Stete)psm.GetSteta(pBrojStete)); } EditView: <div class="editor-label"> <%: Html.Label("Društvo") %> </div> <div class="editor-field"> <%: Html.DropDownListFor(m => m.Drustva.Naziv, ViewData["drustva"] as IEnumerable<SelectListItem>) %> <%: Html.ValidationMessageFor(model => model.FKDrustvo) %> </div> I am sorry for not translating names of the objects into english, but they hardly have appropriate translation. If necessary, I can try creating similar example...

    Read the article

  • Android webview doesn't playing mp4 video in same page

    - by user1668105
    I'm trying to show one local html file contains code for playing video and try to show that html file in android webview. I've used following code to for playing video: WebViewLoadVideoActivity.java //DECLARE webview variable outside of onCreate function so we can access it in other functions (menu) @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView webView = (WebView) findViewById(R.id.webView1); WebSettings webSettings = webView.getSettings(); // Fetches the // WebSettings // import WebViewClient webViewClient = new WebViewClient(); webView.setWebViewClient(webViewClient); // Enabling mp4 webSettings.setPluginsEnabled(true); // Allows plugins to run which are // normally disabled in webView webView.getSettings().setBuiltInZoomControls(true); // Allows the // Android built in // zoom control webView.getSettings().setSaveFormData(true); webView.getSettings().setLoadsImagesAutomatically(true); webView.getSettings().setPluginsEnabled(true); webView.getSettings().setLoadsImagesAutomatically(true); webView.getSettings().setSupportMultipleWindows(true); webView.getSettings().setPluginsEnabled(true); webView.getSettings().setLightTouchEnabled(true); webView.getSettings().setAllowFileAccess(true); // To allow file // downloads/streams // such as mp4, mpeg, // and 3gp files webView.getSettings().setJavaScriptEnabled(true); // Enables HTML // Javascript to run // in webview webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webView.getSettings().setSupportZoom(true); // Support the zoom feature webView.getSettings().setSavePassword(true); // Allow users to save passwords in forms webView.setWebViewClient(new WebViewClient() { // Opens web links clicked by user in the webview @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // Handle the error } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } }); webView.loadUrl("file:///android_asset/test.html"); // test.html file from assets folder //... Rest of activity code... test.html <!DOCTYPE html> <html> <body> <video width="320" height="240" controls="controls"> <source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4" /> Your browser does not support the video tag. </video> </body> </html> Problem Area : Android webview or Android Default Browser shows the video content in another video view when we click play button, My requirement is that video should be opened in same html page inline, so user can navigate to other page of webpage during video is playing or buffering. Research Area : I tried many other ways like, video tag of HTML5 embed tag of HTML object tag of HTML Other way of video player integration i checked so far but not worked in my requirement, Flare Video jplayer Please suggest me any way that can be suitable for my requirement, And my requirement is very simple as, I want to play video in html file as inline in webview widget of android. Thanks in Advance.

    Read the article

  • css: zoooming-out inside the browser moves rightmost floated div below other divs

    - by John Sonderson
    I am seeing something strange in both firefox and chrome when I increase the zoom level inside these browsers, although I see nothing wrong with my CSS... I am hoping someone on this group will be able to help. Here is the whole story: I have a right-floated top-level div containing three right-floated right. The three inner divs have all box-model measurements in pixels which add up to the width of the enclosing container. Everything looks fine when the browser size is 100%, but when I start making the browser smaller with CTRL+scrollwheel or CTRL+minus the rightmost margin shrinks down too fast and eventually becomes zero, forcing my rightmost floated inner div to fall down below the other two! I can't make sense out of this, almost seems like some integer division is being performed incorrectly in the browser code, but alas firefox and chrome both display the same result. Here is the example (just zoom out with CTRL-minus to see what I mean): Click Here to View What I Mean on Example Site Just to narrow things down a bit, the tags of interest are the following: div#mainContent div#contentLeft div#contentCenter div#contentRight I've searched stackoverflow for an answer and found the following posts which seem related to my question but was not able to apply them to the problem I am experiencing: http:// stackoverflow.com/questions/6955313/div-moves-incorrectly-on-browser-resize http:// stackoverflow.com/questions/18246882/divs-move-when-resizing-page http:// stackoverflow.com/questions/17637231/moving-an-image-when-browser-resizes http:// stackoverflow.com/questions/5316380/how-to-stop-divs-moving-when-the-browser-is-resized I've duplicated the html and css code below for your convenience: Here is the HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Pinco</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="wrapper"> <header> <div class="logo"> <a href="http://pinco.com"> <img class="logo" src="images/PincoLogo5.png" alt="Pinco" /> </a> </div> <div class="titolo"> <h1>Benvenuti!</h1> <h2>Siete arrivati al sito pinco.</h2> </div> <nav> <ul class="menu"> <li><a href="#">Menù Qui</a></li> <li><a href="#">Menù Quo</a></li> <li><a href="#">Menù Qua</a></li> </ul> </nav> </header> <div id="mainContent"> <div id="contentLeft"> <section> <article> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tempor turpis est, nec varius est pharetra scelerisque. Sed eu pellentesque purus, at cursus nisi. In bibendum tristique nunc eu mattis. Nulla pretium tincidunt ipsum, non imperdiet metus tincidunt ac. In et lobortis elit, nec lobortis purus. Cras ac viverra risus. Proin dapibus tortor justo, a vulputate ipsum lacinia sed. In hac habitasse platea dictumst. Phasellus sit amet malesuada velit. Fusce diam neque, cursus id dui ac, blandit vehicula tortor. Phasellus interdum ipsum eu leo condimentum, in dignissim erat tincidunt. Ut fermentum consectetur tellus, dignissim volutpat orci suscipit ac. Praesent scelerisque urna metus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis pulvinar, sem a sodales eleifend, odio elit blandit risus, a dapibus ligula orci non augue. Nullam vitae cursus tortor, eget malesuada lectus. Nulla facilisi. Cras pharetra nisi sit amet orci dignissim, a eleifend odio hendrerit. </p> </article> </section> </div> <div id="contentCenter"> <section> <article> <p> Maecenas vitae purus at orci euismod pretium. Nam gravida gravida bibendum. Donec nec dolor vel magna consequat laoreet in a urna. Phasellus cursus ultrices lorem ut sagittis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus purus felis, ornare quis ante vel, commodo scelerisque tortor. Integer vel facilisis mauris. </p> <img src="images/auto1.jpg" width="272" height="272" /> <p> In urna purus, fringilla a urna a, ultrices convallis orci. Duis mattis sit amet leo sed luctus. Donec nec sem non nunc mattis semper quis vitae enim. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse dictum porta quam, vel lobortis enim bibendum et. Donec iaculis tortor id metus interdum, hendrerit tincidunt orci tempor. Sed dignissim cursus mattis. </p> </article> </section> </div> <div id="contentRight"> <section> <article> <img src="images/auto2.jpg" width="272" height="272" /> <img src="images/auto3.jpg" width="272" height="272" /> <p> Cras eu quam lobortis, sodales felis ultricies, rhoncus neque. Aenean nisi eros, blandit ac lacus sit amet, vulputate sodales mi. Nunc eget purus ultricies, aliquam quam sit amet, porttitor velit. In imperdiet justo in quam tristique, eget semper nisi pellentesque. Cras fringilla eros enim, in euismod nisl imperdiet ac. Fusce tempor justo vitae faucibus luctus. </p> </article> </section> </div> </div> <footer> <div class="footerText"> <p> Copyright &copy; Pinco <br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br />Fusce ornare turpis orci, nec egestas leo feugiat ac. <br />Morbi eget sem facilisis, laoreet erat ut, tristique odio. Proin sollicitudin quis nisi id consequat. </p> </div> <div class="footerLogo"> <img class="footerLogo" src="images/auto4.jpg" width="80" height="80" /> </div> </footer> </div> </body> </html> and here is the CSS: /* CSS Document */ * { margin: 0; border: 0; padding: 0; } body { background: #8B0000; /* darkred */; } body { margin: 0; border: 0; padding: 0; } div#wrapper { margin: 0 auto; width: 960px; height: 100%; background: #FFC0CB /* pink */; } header { position: relative; background: #005b97; height: 140px; } header div.logo { float: left; width: 360px; height: 140px; } header div.logo img.logo { width: 360px; height: 140px; } header div.titolo { float: left; padding: 12px 0 0 35px; color: black; } header div.titolo h1 { font-size: 36px; font-weight: bold; } header div.titolo h2 { font-size: 24px; font-style: italic; font-weight: bold; color: white;} header nav { position: absolute; right: 0; bottom: 0; } header ul.menu { background: black; } header ul.menu li { display: inline-block; padding: 3px 15px; font-weight: bold; } div#mainContent { float: left; width: 100%; /* width: 960px; *//* height: 860px; */ padding: 30px 0; text-align: justify; } div#mainContent img { margin: 12px 0; } div#contentLeft { height: 900px; float: left; margin-left: 12px; border: 1px solid black; padding: 15px; width: 272px; background: #ccc; } div#contentCenter { height: 900px; float: left; margin-left: 12px; border: 1px solid transparent; padding: 15px; width: 272px; background: #E00; } div#contentRight { height: 900px; float: left; margin-left: 12px; border: 1px solid black; padding: 15px; width: 272px; background: #ccc; } footer { clear: both; padding: 12px; background: #306; color: white; height: 80px; font-style: italic; font-weight: bold; } footer div.footerText { float: left; } footer div.footerLogo { float: right; } a { color: white; text-decoration: none; } Thanks.

    Read the article

  • Python web scraping involving HTML tags with attributes

    - by rohanbk
    I'm trying to make a web scraper that will parse a web-page of publications and extract the authors. The skeletal structure of the web-page is the following: <html> <body> <div id="container"> <div id="contents"> <table> <tbody> <tr> <td class="author">####I want whatever is located here ###</td> </tr> </tbody> </table> </div> </div> </body> </html> I've been trying to use BeautifulSoup and lxml thus far to accomplish this task, but I'm not sure how to handle the two div tags and td tag because they have attributes. In addition to this, I'm not sure whether I should rely more on BeautifulSoup or lxml or a combination of both. What should I do? At the moment, my code looks like what is below: import re import urllib2,sys import lxml from lxml import etree from lxml.html.soupparser import fromstring from lxml.etree import tostring from lxml.cssselect import CSSSelector from BeautifulSoup import BeautifulSoup, NavigableString address='http://www.example.com/' html = urllib2.urlopen(address).read() soup = BeautifulSoup(html) html=soup.prettify() html=html.replace('&nbsp', '&#160') html=html.replace('&iacute','&#237') root=fromstring(html) I realize that a lot of the import statements may be redundant, but I just copied whatever I currently had in more source file. EDIT: I suppose that I didn't make this quite clear, but I have multiple tags in page that I want to scrape.

    Read the article

  • Frameset isn't working in IE

    - by Cameroon
    First of all, why use a frame set in the first place you ask? answer: Because my boss told me. That been said, I have 2 files. Index.html and Head.html. Contents of index.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Site Title</title> </head> <frameset rows="122,*" FRAMEBORDER=NO FRAMESPACING=2 BORDER=0> <frame name="t" src="head.html" scrolling="no" marginheight="0" marginwidth="0"> <frame name="b" src="http://www.website.com"> </frameset> <noframes> <p>You have frames turned off on your browser, please turn it on and reload this page.</p> </noframes> </html> Contents of head.html: <div style="border-bottom:2px solid #000;height:120px"> <center>This is the frame head.</center> </div> The code works fine in all browsers except Internet Explorer 7 and 8 (I don't care about 6). Is there anything I am doing wrong, and if not then can the same effect be achieved without frames and if so how?

    Read the article

  • Should I work on CSS or apps first?

    - by Fred
    I am working on my own website for my business, and I need to contract out some assistance. For example, I have the site looking pretty good on Firefox, but it needs help on other browsers. I also need some help with adding some Django apps to the site and setting up a database. I plan to seek the help of two different individuals via elance or odesk. My question is which to do first - get the css and html right then do the apps, or get the apps done and then work on the css and html? Thanks in advance for any suggestions.

    Read the article

  • how to get doctype tag with url using xsl:output

    - by keshav.veerapaneni
    Hi, i have added the below xsl:output tag in xslt <xsl:output method="html" indent="yes" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" </xsl:output as a result i get the below doctype tag in the html output- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" how can i mention the url in the doctype tag using xsl:output which would output a doctype tag that looks like below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" Best Regards, Keshav

    Read the article

  • What is your workflow when designing HTML/CSS layouts?

    - by DMin
    I have been working with PHP/MySQL as a hobby for close to a couple of years now, I have been working with photoshop for a very long time, I know CSS & HTML well enough to write without any reference, so, I would not consider myself someone who's very new at this. I have recently started developing websites professionally - (only person working on the project). I have seen the power of Joomla and how you can make a website ready for your customer in a matter of hours(if not minutes). I find it very hard to make layouts that remotely look like the themes on joomla. I find making even simple layouts a very cumbersome process and takes a lot of time to get a good enough output. I have a feeling I may not be using the right tools or workflow for the job. What I wanted to findout was, as part of the industry : How do, you, make your website when you do it from scratch? What are the tools that you use? What is your workflow? Just noted a few things I know already, for your reference(You can skip this if you like) I have seen the export for web for Photoshop that exports CSS - but (as far as I know) exports only absolutely positioned webpages so they need to be beaten and fixed if you want to use them for example for joomla. I have used the SiteGrinder plugin for Photoshop that exports HTML/CSS. It looks promising but haven't tried it extensively. One of the tools that save loads of time is FireBug. This makes it easy to edit html and css on the fly and get the page looking exactly as you want it. Recently stumbled upon fireworks. But haven't explored it much. Thanks! :)

    Read the article

  • Using hreflang to specify a catchall language

    - by adam
    We have a site primarily targeted at the UK market, and are adding a US-market alternative. As per Google's recommendations: To indicate to Google that you want the German version of the page to be served to searchers using Google in German, the en-us version to searchers using google.com in English, and the en-gb version to searchers using google.co.uk in English, use rel="alternate" hreflang="x" to identify alternate language versions. Which gives us: <link rel="alternate" hreflang="en-gb" href="http://www.example.com/page.html" /> <link rel="alternate" hreflang="en-us" href="http://www.example.com/us/page.html" /> We do get enquiries from other areas of the world - particularly where there are expat communities (Dubai, UAE, Portugal etc). By adding the above tags, is there a risk that Google will only surface our site for UK and US search users? Do we need to specify a catch-all that will default all other searches to our UK site?

    Read the article

  • Difference between jquery.clone() and simple concatenation of string [closed]

    - by Francis Cebu
    Which of the following code samples is faster in generating HTML code using jQuery? Sample 1: var div = $("<div>"); $.each(data,function(count,item){ var Elem = div.clone().addClass("message").html(item.Firstname); $(".container").append(Elem); }); Sample 2: $.each(data,function(count,item){ var Elem = "<div class = 'Elem'>" + item.Firstname + "</div>"; $(".container").append(Elem); });

    Read the article

  • Simple way to embed an MP3 audio file in a (static) HTML file, starting to play at a specifc time?

    - by Marcel
    Hi all, I want to produce a simple, static HTML file, that has one or more embedded MP3 files in it. The idea is to have a simple mean of listening to specific parts of an mp3 file. On a single click on a visual element, the sound should start to play; However, not from the beginning of the file, but from a specified starting point in that file (and play to the end of the file). This should work all locally from the client's local filesystem, the HTML file and the MP3 files do not reside on a webserver. So, how to play the MP3 audio from a specific starting point? The solution I am looking for should be as simple as possible, while working on most browsers, including IE, Firefox and Safari. Note: I know the <embed> tag as described here, but this seems not to work with my target browsers. Also I have read about jPlayer and other Java-Script-based players, but since I have never coded some JavaScript, I would prefer a HTML-only solution, if possible.

    Read the article

  • Is my Document Type Definition Still Up to Date?

    - by Sam
    Hi folks, currently all my php generated rich html webpages start with this line, which I have been adding to my tempaltes YEARS ago... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Am I still up to date and 2011-proof? or Should I be changing this into something fasterloaden/more agile/more flexible? I have heard of XHTML 1.1. When I remove this line all still works fine. Is it very much needed still? What are my alternatives? Thanks very much for your suggestions.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >