Search Results

Search found 3221 results on 129 pages for 'inline styles'.

Page 10/129 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Parsing XHTML with inline tags

    - by user290796
    Hi, I'm trying to parse an XHTML document using TBXML on the iPhone (although I would be happy to use either libxml2 or NSXMLParser if it would be easier). I need to extract the content of the body as a series of paragraphs and maintain the inline tags, for example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Title</title> <link rel="stylesheet" href="css/style.css" type="text/css"/> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/> </head> <body> <div class="body"> <div> <h3>Title</h3> <p>Paragraph with <em>inline</em> tags</p> <img src="image.png" /> </div> </div> </body> </html> I need to extract the paragraph but maintain the <em>inline</em> content with the paragraph, all my testing so far has extracted that as a subelement without me knowing exactly where it fitted in the paragraph. Can anyone suggest a way to do this? Thanks.

    Read the article

  • Align div inline

    - by Rajeev
    How to make the second div inline to the first div.I need the flash swf to appear next to the tds <html> <div style="display: inline"> <table style="table-layout:fixed;width:100%;"> <tr> <td width ="20%"> </td> </tr> <tr> <td width="20%"> 1.Can you view the image? </td> <td width="20%"> 1.Can you upload the image? </td> </tr> </table> </div> <div style="display: inline;"> <object width="100" height="100"> <embed src="image_tr.swf" width="250" height="250"> </embed> </object> </div>

    Read the article

  • Inline form fields with labels placed on top

    - by rcourtna
    I can't believe I'm having to ask this, but I'm at my wit's end. I'm trying to display 2 form fields inline, but with the label for each field on the top. In ascii art: Label 1 Label 2 --------- --------- | | | | --------- --------- Should be pretty simple. <label for=foo>Label 1</label> <input type=text name=foo id=foo /> <label for=bar>Label 2</label> <input type=text name=bar id=bar /> This will get me: --------- --------- Label 1 | | Label 2 | | --------- --------- To get the labels on top of the boxes, I add display=block: <label for=foo style="display:block">Label 1</label> <input type=text name=foo id=foo /> <label for=bar style="display:block">Label 2</label> <input type=text name=bar id=bar /> After I do this, the labels are where I want them, but the form fields are no longer inline: Label 1 --------- | | --------- Label 2 --------- | | --------- I've been unable to find a way to wrap my html so the fields display inline. Can anyone help?

    Read the article

  • Bootstrap inline button dropdown within <p> jumbotron

    - by C.B.
    Currently I have a jumbotron setup with some paragraph text, and I would like to stick a button dropdown inline with the text. Dropdown button <span class="btn-group"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> Button... <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="#">Opt 1</a></li> <li><a href="#">Opt 2</a></li> </ul> </span> Jumbotron <div class="jumbotron"> <h1>Hello!</h1> <p>Welcome</p> <p>Another paragraph <!-- dropdown is here --> </p> </div> <!-- jumbotron --> If the dropdown is within the <p> tag, it does not "dropdown" (but renders). If it is outside of the <p> tag it functions fine, but I would like it to be inline with the text and need the text to be in the <p> tag to get the style. Any ideas? Things to note -- If I replace the <span> tags with <div> tags, it will work fine within the <p> tags, but won't be inline.

    Read the article

  • Numbered paragraphs in Word 2007

    - by Kit
    I have the following styles defined in Word 2007. They all have outline levels 1-6. They also correctly show up in the Table of Contents (not all, I only set the TOC up to Level 3). 1 Heading 1 1.1 Heading 2 1.1.1 Heading 3 1.1.1.1 Heading 4 1.1.1.1.1 Heading 5 1.1.1.1.1.1 Heading 6 This is what I want 1 Heading 1 1.1 Body text under Heading Level 1 1.2 Body text under Heading Level 1 2 Heading 1 2.1 Heading 2 2.1.1 Body text under Heading Level 2 2.1.2 Body text under Heading Level 2 2.1.3 Body text under Heading Level 2 2.2 Heading 2 2.2.1 Body text under Heading Level 2 2.2.2 Body text under Heading Level 2 How do I make two list sequences link to each other? Here's a {fill in the blanks} illustration: {section number} Heading 1 {section number}.{clause number} Body text under Heading Level 1 {section number}.{clause number} Body text under Heading Level 1 The example above should expand to: 1 Heading 1 1.1 Body text under Heading Level 1 1.2 Body text under Heading Level 1 Another example: {section number} Heading 1 {section number}.{subsection number} Heading 2 {section number}.{subsection number}.{clause number} Body text under Heading Level 2 {section number}.{subsection number}.{clause number} Body text under Heading Level 2 should expand to: 2 Heading 1 2.1 Heading 2 2.1.1 Body text under Heading Level 2 2.1.2 Body text under Heading Level 2 2.1.3 Body text under Heading Level 2 The numbered body text paragraphs shouldn't show up the Table of Contents. I couldn't find the right way to do that, whether in multilevel lists, fields, styles, etc. How do I do it right?

    Read the article

  • No styles / images on asp.Net MVC 2 application

    - by xenolf
    Greetings i have a little problem with my ASP MVC application. On my local development server everything works just fine but when i try to publish the application to an IIS 7.0 server it just displays plain pages without any styles / markups / images. I put all those things in the /Content/ subfolder but when i try to access that folder on the production server it just returns me a 404 not found error. I set the IIS server up with .Net 4.0 and followed the deployment guide on here: http://www.asp.net/learn/mvc/tutorial-08-cs.aspx All views / controllers / classes seem to work just fine, the only thing which does not is the content subfolder and i cant see why. Anyone got a suggestion what i could have overlooked or does anyone know that problem?

    Read the article

  • Systematically resolve conflicting styles in css

    - by Frank Michael Kraft
    I have some stylesheets from different sources in my web project. I want to harmonize them. Some styles I need from the one, some from the other. Is there a tool or method how to systematically resolve style conflicts? I tried IE8 developer tool, and yes, it is possible to view conflicts at the level of each element. But I have many elemens, so if I do it element by element I think this takes too long. Theoretically there could be a tool that shows conflicts of two css files at design time?!? I think this would save me a lot of time.

    Read the article

  • Adding CSS styles to injected DOM elements

    - by Nyxynyx
    I am using javascript to inject a few DOM elements into the page. I am able to inject a single DOM element and apply CSS style to it: var $e = $('<div id="header"></div>'); $('body').append($e); $e.css({ background: '#fbf7f7', }); Problem: If I have nested elements within $e, how can I apply CSS styles to the parents and its children seperately? var $e = $('<div id="header"><div class="header-content"><span class="title"></span></div></div>');

    Read the article

  • Paperclip + ImageMagick on Windows 7: Image display fails when I add styles to attached_file in mode

    - by Brian Roisentul
    I'm working with Ruby on rails 2.3.8, NetBeans IDE. I've installed paperclip and I could show/save images successfully. Now, I've installed ImageMagick-6.6.2-4-Q16(for windows 7, 64bits). Until that moment, my model looked like this(and worked fine): has_attached_file :photo Now, after installing ImageMagick, when I add the :style line it fails: has_attached_file :photo, :styles => {:thumb => "100x100#", :small => "150x150>", :large => "400x400>" } and it throws the following error message when I try to upload an image: TypeError in ProfilesController#update backtrace must be Array of String The only thing I'm doing in the update action of that controller is the following: @profile.update_attributes(params[:profile]) @profile.update_attribute(:photo, params[:profile][:photo]) I've also installed miniMagick gem(because I read somewhere I had to do it). What am I missing?

    Read the article

  • Changing all CSS styles with a property via Jquery

    - by Joe
    On a page I include some css eg: <style type='test/css'> .myBox{ color:#000000; border:#FFFFFF; padding:4px; } .myBox2{ color:#000000; border:#FFFFFF; padding:4px; } </style> I want to then change the "color" property set within both myBox and myBox2 in jquery, without knowing the actual name (myBox, myBox2) of the css style. In otherwords, I want to update ALL css styles on the page where color = certain value, and then also update border where = certain value. An example (not valid code) might be: $("all css [color:#000000]").html("#FF0000"); How could this be possible using jquery?

    Read the article

  • CSS: Base styles on body or html?

    - by Svish
    When I declare some base styles for my site I have used to do that on the body tag. Like for example body { font-size: medium; line-height: 1.3em; } But I have also seen people do things like that on the html tag. And on both. Where should it be done? Should some be at one and some at the other? Should all be on one of them? Or does it simply not matter at all? Or?

    Read the article

  • Dynamic themes and custom styles

    - by Lawrence Kesteloot
    I've got an app with two themes (dark and light) that can be selected at runtime. This works. I also have a ListView with rows that can have one of three different layouts, each of which has a style (say, different colors). This also works. But I can't get these two features to work together. I really need six different styles, three for one theme (dark) and three for the other (light), but I can't figure out how to choose a style for a list item based on the current theme, or get that effect any other way by using XML files. My three layouts each point to a custom theme that sets the color, but that overrides whatever theme I've got set. Themes can only contain items that are "styleable", so I can't put my own custom items in there. There may be a way to do this programmatically, but I was hoping to do it declaratively. Any ideas?

    Read the article

  • Extract inline images from Lotus Notes using Lotus Notes Java API

    - by user1660645
    I'm having issues to extract inline images that are pasted in the email body if the emails are sent from external email(like gmail for example) into the Lotus notes. The emails which are sent from Lotus Notes itself has no issues and I'm able to retrieve the inline images by using the document.generateXML() method and parsing through ['picture' xml element tag] the stream. My real concern is how to extract from the external emails(like gmail). I would really appreciate for your help and time on this. Thanks in advance!...

    Read the article

  • yui datatable inline cell editor problem

    - by Eli
    Hi, When using inline cell editor in my datatable I want to round value to 10 multiple This is my code : mydatatable.subscribe("cellDblclickEvent",datatable_DetailsCommande.onEventShowCellEditor); var onCellEdit = function(oArgs) { var oColumn=oArgs.editor.getColumn(); var column=oColumn.getKey(); var oRecord = oArgs.editor.getRecord(); var newValue=oRecord.getData(column); var row = this.getRecord(oArgs.target); // calculate the modulo n = newValue % 10; if(n!=0) { newValue=parseInt(newValue); oRecord.setData(column,eval(newValue+(10-n))); } } mydatatable.subscribe("editorSaveEvent", onCellEdit); Function result : After double clicking in cell I change value to 17 for example and I click save, I want then to have 20 in my datatable cell but I got 17. After second time double clicking in my datatable cell I obtain 20 in the inline cell editor. How to put the rounded value in my datatable cell? regards,

    Read the article

  • How to customize a many-to-many inline model in django admin

    - by Jonathan
    I'm using the admin interface to view invoices and products. To make things easy, I've set the products as inline to invoices, so I will see the related products in the invoice's form. As you can see I'm using a many-to-many relationship. In models.py: class Product(models.Model): name = models.TextField() price = models.DecimalField(max_digits=10,decimal_places=2) class Invoice(models.Model): company = models.ForeignKey(Company) customer = models.ForeignKey(Customer) products = models.ManyToManyField(Product) In admin.py: class ProductInline(admin.StackedInline): model = Invoice.products.through class InvoiceAdmin(admin.ModelAdmin): inlines = [FilteredApartmentInline,] admin.site.register(Product, ProductAdmin) The problem is that django presents the products as a table of drop down menus (one per associated product). Each drop down contains all the products listed. So if I have 5000 products and 300 are associated with a certain invoice, django actually loads 300x5000 product names. Also the table is not aesthetic. How can I change it so that it'll just display the product's name in the inline table? Which form should I override, and how?

    Read the article

  • Inline-editing: onBlur prevents onClick from being triggered (jQuery)

    - by codethief
    Hello StackOverflow community! I'm currently working on my own jQuery plugin for inline-editing as those that already exist don't fit my needs. Anyway, I'd like to give the user the following (boolean) options concerning the way editing is supposed to work: submit_button reset_on_blur Let's say the user would like to have a submit button (submit_button = true) and wants the inline input element to be removed as soon as it loses focus (reset_on_blur = true). This leads to an onClick handler being registered for the button and an onBlur handler being registered for the input element. Every time the user clicks the button, however, the onBlur handler is also triggered and results in the edit mode being left, i.e. before the onClick event occurs. This makes submitting impossible. FYI, the HTML in edit mode looks like this: <td><input type="text" class="ie-input" value="Current value" /><div class="ie-content-backup" style="display: none;">Backup Value</div><input type="submit" class="ie-button-submit" value="Save" /></td> So, is there any way I could check in the onBlur handler if the focus was lost while activating the submit button, so that edit mode isn't left before the submit button's onClick event is triggered? I've also tried to register a $('body').click() handler to simulate blur and to be able to trace back which element has been clicked, but that didn't work either and resulted in rather strange bugs: $('html').click(function(e) { // body doesn't span over full page height, use html instead // Don't reset if the submit button, the input element itself or the element to be edited inline was clicked. if(!$(e.target).hasClass('ie-button-submit') && !$(e.target).hasClass('ie-input') && $(e.target).get(0) != element.get(0)) { cancel(element); } }); jEditable uses the following piece of code. I don't like this approach, though, because of the delay. Let alone I don't even understand why this works. ;) input.blur(function(e) { /* prevent canceling if submit was clicked */ t = setTimeout(function() { reset.apply(form, [settings, self]); }, 500); }); Thanks in advance!

    Read the article

  • When functionalities of html attributes and css styles overlap

    - by AspOnMyNet
    1) If inside CSS file we specify the following style: .td { text-align:center; } While in a Html file we have <td align=”right” … > then value set in CSS file will take precedence over an inline html attribute and thus elements contained inside <td> cell will be aligned to the center. a) Is same true for all html attributes? Meaning if a CSS rule and an html attribute functionalities overlap , will the CSS rule always take precedence? BTW – I know we should usually prefer using CSS rules vs html attributes thanx

    Read the article

  • OpenMP timer doesn't work on inline assembly code?

    - by Brett
    I'm trying to compare some code samples for speed, and I decided to use the OpenMP timer since I'll eventually be multi threading the code. The timer works great on two of my four code snippets, but not on the other two start=omp_get_wtime(); /*code here*/ finish = omp_get_wtime() - start_time; The four code here sections are serial code, xmmintrin.h code, and two inline assembly codes. The serial and xmminstrin.h code are able to be timed, but the inline assembly codes returns -1.#IND00 for a time. I can't seem to figure out why this is? Thanks for any help or suggestions!

    Read the article

  • IE and Content-disposition inline vs. extension-token

    - by pinkgothic
    Preamble So IE does Mime-Type sniffing. That part's old news. Suggestions of how to combat it tend to be along the lines of 'supply a content-type IE trusts' (i.e. anything that isn't text/plain or application/octet-stream) or 'add extraneous data at the start of the file that is definitely of the type you're serving'. Now, I'm working on an application that has to allow message attachments (like in e-mails), and we want to close up XSS vectors. IE's mime sniffing is one of those vectors - a text/plain file with html content will trigger as html. Recoding isn't an option at this point, changing the attachments the user has provided can only happen if there is absolutely no doubt about the maliciousness of the file - and someone might want to send HTML as text. Now, Microsoft's MSDN article implies the situation might be easier to fix than advertised: If Internet Explorer knows the Content-Type specified and there is no Content-Disposition data, Internet Explorer performs a "MIME sniff," [...] Great! Except I don't have IE nor current means to reliably install it (I realise this is a fairly sad state for a webdeveloper to be in, I hope to fix this soon) and this is grey theory that I can't quite seem to get confirmed one way or the other. Local sources say that line is hogwash - IE will mime sniff anything that is Content-Disposition: inline / <default> and not specific enough for its tastes in -Type. But what about x-* ('extension-token' in the RFC)? Trying to google for how browsers handle Content-Disposition: <extension-token> hasn't yielded anything (though I may just be doing it wrong, my understanding of Google is seriously slipping lately). I found one question that looked promising, but turned out to be a misunderstanding on side of the thread author, meaning that the train of thought was never actually addressed there. Question(s) Does IE really Mime sniff if you expressly pass Content-Disposition: inline? If so: Does anyone here know how browsers handle Content-Disposition: <extension-token>? If they do this in a way that is for my purposes benign, by presuming it to be synonymous with the default (effectively 'inline', though I hear it's not defined anywhere?), is it specific enough for IE not to Mime sniff? Or am I actually shooting myself in the foot by thinking of pursuing this avenue?

    Read the article

  • Trying to get these list items to display inline

    - by Joel
    I have several unordered lists that I want to display like this: <ul> <li><img></li> <li><p></li> //inline </ul> //linebreak <ul> <li><img></li> <li><p></li> //inline </ul> ...etc I'm not able to get the li items to be inline with eachother. They are stacking vertically. I have stripped away most styling but still can't figure out what I'm doing wrong: html: <ul class="instrument"> <li class="imagebox"><img src="/images/matepe.jpg" width="247" height="228" alt="Matepe" /></li> <li class="textbox"><p>The matepe is a 24 key instrument that is played by the Kore-Kore people in North-Eastern Zimbabwe and Mozambique. It utilizes four fingers-each playing an individual melody. These melodies also interwieve to create resultant melodies that can be manipulated thru accenting different fingers. The matepe is used in Rattletree as the bridge from the physical world to the spirit world. The matepe is used in the Kore-Kore culture to summon the Mhondoro spirits which are thought to be able to communicate directly with Mwari (God) without the need of an intermediary.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/soprano_little.jpg" border="0" width="247" height="170" alt="Soprano" /></li> <li class="textbox"><p>The highest voice of the Rattletree Marimba orchestra is the Soprano marimba. The soprano is used to whip up the energy on the dancefloor and help people reach ecstatic state with it's high and clear singing voice. The range of these sopranos goes much lower than 'typical' Zimbabwean style sopranos. The sopranos play the range of the right hand of the matepe and go two notes higher and five notes lower. Rattletree uses two sopranos.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/bari_little.jpg" border="0" width="247" height="170" alt="Baritone" /></li> <li class="textbox"><p>The Baritone is the next lower voice in the orchestra. The bari is where the funk is. Generally bubbling over the Bass line, the baritone creates the syncopations and polyrhythms that messes with the 'minds' of the dancers and helps seperate the listener from the physical realm of thought. The range of the baritone covers the full range of the left hand side of the matepe.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/darren_littlebass.jpg" border="0" width="247" height="195" alt="Bass"/><strong>Bass Marimba</strong></li> <li class="textbox"><p>The towering Bass Marimba is the foundation of the Rattletree Marimba sound. Putting out frequencies as low as 22hZ, the bass creates the drive that gets the dancefloor moving. It is 5.5' tall, 9' long, and 4' deep. It is played by standing on a platform and struck with mallets that have lacross-ball size heads (they are actually made with rubber dog balls). The Bass marimba's range covers the lowest five notes of the matepe and goes another five notes lower.</p></li> </ul> <ul class="instrument"> <li class="imagebox"><img src="/images/wayne_little.jpg" border="0" width="247" height="177" alt="Drums"/><strong>Drumset</strong></li> <li class="textbox"><p>All the intricate polyrhythms are held together tastefully with the drumset. The drums provides the consistancy and grounding that the dancers need to keep going all night. While the steady kick and high-hat provide that grounding function, the toms and snare and allowed to be another voice in the poylrhythmic texture-helping the dancers abandon the concept of a "one" within this cyclical music.</p></li> </ul> css: ul.instrument { text-align:left; display:inline; } ul.instrument li { list-style-type: none; } li.imagebox { } li.textbox { } li.textbox p{ width: 247px; }

    Read the article

  • Inline Form Validation in Django

    - by allanhenderson
    Newbie request that seems difficult to implement. I would like to make an entire inline formset within an admin change form compulsory.. so in my current scenario when I hit save on an Invoice form (in Admin) the inline Order form is blank. I'd like to stop people creating invoices with no orders associated. Anyone know an easy way to do that? Normal validation like (required=True) on the model field doesn't appear to work in this instance. Thanks!!

    Read the article

  • JQuery: Specify placement of error messages inline using Metadata and Validate plugins

    - by jalperin
    I'm doing form validation using JQuery with the validate and metadata plugins. I'm using the metadata plugin so I can specify the rules and messages inline in the html form instead of in the javascript in the page . I'm getting an error when I try to specify the location of the error message using errorPlacement. (If I specify it in the section it works fine, but not if I specify it inline.) Here's what my html looks like: <input name="list" id="list1" type="checkbox" validate="{required:true, minlength:1, messages:{required:'Please select at least one newsletter.', minlength:'Please select at least one newsletter.'}, errorPlacement: function(error, element) { error.appendTo('#listserror');} }"> As reported by the validate debug function, the error is: "error.appendTo is not a function." It works fine if I specify it in the section like this: $().ready(function() { $("#subscribeForm").validate({ errorPlacement: function(error, element) { if (element.attr("name") == "list" ) error.appendTo("#listserror"); else error.insertAfter(element); } }); });

    Read the article

  • Convert inline image tags like [image:123:title:size] into HTML img tags

    - by Jacques Joubert
    I am looking for help with regular expression $pattern to convert inline image tags like [image:123:title:size] into HTML img tags. here is the code: //[image:ID:caption:size] $content = '[image:38:title:800x900]'; preg_match_all( '/\[image:(\d+)(:?)([^\]]*)\]/i', $content, $images ); if( !empty( $images[0] ) ) { // There are image inline tags in the content foreach( $images[0] as $i => $tag ) { $link_ID = (int)$images[1][$i]; $caption = empty( $images[2][$i] ) ? '#' : $images[3][$i]; $size = empty( $images[4][$i] ) ? '#' : $images[4][$i]; } echo '<br />'; echo 'ID: '.$link_ID.'<br />'; echo 'Tag: '.$caption.'<br />'; echo 'size: '.$size.'<br />'; } which outputs: ID: 12 Tag: caption:size size: # Any help would be great!

    Read the article

  • Why is display:inline killing IE 8.0 performance?

    - by monstermensch
    I have an image gallery based on this jQuery plugin: http://jqueryfordesigners.com/demo/slider-gallery.html This works really well in Firefox, Chrome and even IE 7.0, but when I try it with more than 50 images in IE 8.0 the performance is incredible slow. Just hovering over the thumbnail brings the CPU load to 100%. At first I thought it's a Javascript problem, so I used the IE profiler, but the results were normal. Next I checked the CSS and finally found the cause: .sliderGallery UL LI { display: inline; } This gets the thumbnails to align horizontally. If I chance it to display:block, performance is fine and the scroller is still working but obviously it looks funny, because the thumbs are aligned vertically. My questions: Why does IE 8 have this problem with many display:inline elements What can I do to solve it I'll gladly provide more information if necessary.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >