Search Results

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

Page 13/129 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Dynamically Delete inline formsets in Django

    - by BenMills
    Is it possible to have Django automatically delete formsets that are not present in the request? So for example if I had three inline formsets represented in HTML when I loaded my edit page and I use javascript to remove two of those when the request is processes Django sees that those two forms are no longer their and deletes them.

    Read the article

  • inline and member initializers

    - by Alexander
    When should I inline a member function and when should I use member initializers? My code is below.. I would like to modify it so I could make use some inline when appropriate and member initializers: #include "Books.h" Book::Book(){ nm = (char*)""; thck = 0; wght = 0; } Book::Book(const char *name, int thickness, int weight){ nm = strdup(name); thck = thickness; wght = weight; } Book::~Book(){ } const char* Book::name(){ return nm; } int Book::thickness(){ return thck; } int Book::weight(){ return wght; } // // Prints information about the book using this format: // "%s (%d mm, %d dg)\n" // void Book::print(){ printf("%s (%d mm, %d dg)\n", nm, thck, wght); } Bookcase::Bookcase(int id){ my_id = id; no_shelf = 0; } int Bookcase::id(){ return my_id; } Bookcase::~Bookcase(){ for (int i = 0; i < no_shelf; i++) delete my_shelf[i]; } bool Bookcase::addShelf(int width, int capacity){ if(no_shelf == 10) return false; else{ my_shelf[no_shelf] = new Shelf(width, capacity); no_shelf++; return true; } } bool Bookcase::add(Book *bp){ int index = -1; int temp_space = -1; for (int i = 0; i < no_shelf; i++){ if (bp->weight() + my_shelf[i]->curCapacity() <= my_shelf[i]->capacity()){ if (bp->thickness() + my_shelf[i]->curWidth() <= my_shelf[i]->width() && temp_space < (my_shelf[i]->width() - my_shelf[i]->curWidth())){ temp_space = (my_shelf[i]->width()- my_shelf[i]->curWidth()); index = i; } } } if (index != -1){ my_shelf[index]->add(bp); return true; }else return false; } void Bookcase::print(){ printf("Bookcase #%d\n", my_id); for (int i = 0; i < no_shelf; i++){ printf("--- Shelf (%d mm, %d dg) ---\n", my_shelf[i]->width(), my_shelf[i]->capacity()); my_shelf[i]->print(); } }

    Read the article

  • Using .align in inline assemby

    - by tech74
    Hi, I'm using ".align 16 \n\t" in some inline ARM assembly that is implementing some loops to align it on a 16 byte boundary however gcc asm compiler is complaining that alignement is too large i want to implement -falign-loops=16 in asm for a particular loop Thanks

    Read the article

  • Block elements vs inline elements in HTML: why the distinction?

    - by EpsilonVector
    The distinction between block and inline elements always seemed strange to me. The whole difference is that a block element takes up the entire width thus forcing a line break before and after the element, and an inline element only takes up as much as the content. Why not just have one type of element- an inline element where you can also apply custom height/width, and use that? You want line breaks? Insert a <br />, or maybe add a special tag in the CSS for that behavior. The way it's now, I don't see it solving any problem, and instead it only forces a property that in my opinion should be decided by a designer. So why the two types?

    Read the article

  • wpf: DataGrid disable selected row styles - or row selecting

    - by Sonic Soul
    I am seeing a lot of examples on how to style Selected rows in DataGrid such as this one: http://stackoverflow.com/questions/1223280/how-can-i-set-the-color-of-a-selected-row-in-datagrid Can i just disabled selected row styling? i don't want to have to override every single thing that selected row changes. Just don't want any visible changes. Gotta be easier way than to create templates.. or.. disable selecting rows, if that is easier.. but from browsing this forum that seems hacky as well http://stackoverflow.com/questions/2496814/disable-selecting-in-wpf-datagrid

    Read the article

  • Echo styles into the mashup of a google map and wordpress custom fields

    - by zac
    Using wordpress, I am pulling in a custom fields from specific posts to fill in the content for a google generated map. I am using this code var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<?php $post_id = 182; $my_post = get_post($post_id); $title = $my_post->post_title; $snip = get_post_meta($post_id, 'mapExcerpt', true); echo $title; echo $snip; ?>') map.addOverlay(marker); I am trying to echo css style blocks but this causes a javascript error var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<?php $post_id = 182; $my_post = get_post($post_id); $title = $my_post->post_title; $snip = get_post_meta($post_id, 'mapExcerpt', true); echo "<div class='theTitle'>"; echo $title; echo "</div>"; echo $snip; ?>') map.addOverlay(marker); I get the error missing ) after argument list and the output is var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<div class='theTitle'>Site Title</div>Site excerpt') map.addOverlay(marker); Can someone please show me a more elegant (working) solution for this?

    Read the article

  • Django: Adding inline formset rows without javascript

    - by Brant
    This post relates to this: http://stackoverflow.com/questions/520421/add-row-to-inlines-dynamically-in-django-admin Is there a way to achive adding inline formsets WITHOUT using javascript? Obviously, there would be a page-refresh involved. So, if the form had a button called 'add'... I figured I could do it like this: if request.method=='POST': if 'add' in request.POST: PrimaryFunctionFormSet = inlineformset_factory(Position,Function,extra=1) prims = PrimaryFunctionFormSet(request.POST) Which I thought would add 1 each time, then populate the form with the post data. However, it seems that the extra=1 does not add 1 to the post data.

    Read the article

  • IE8 developer tools missing some styles

    - by Craig Warren
    Hi, I'm having some problems with some CSS properties in IE8. I've tested my site in IE7, Chrome and Firefox and they work fine but IE8 is having some layout issues. I inspect the developer tool option on ie8 and I've noticed that some of the properties I set in CSS are being ignored by ie8. For example: #header { position: relative; padding: 20px; height: 100px; background:url(header.png); } In this header IE8 ignored the height property: If I inspect the element in developer tools it is missing that property and it's crushed into another line: background:url;HEIGHT: 100PX The same thing happens for floats too: #logon { float: left; text-align:right; width:20%; height: 40px; padding-left: 0px; padding-right:7px; border:0; margin:0; background: url(navgradient.gif); } This ignores the float value: background: url(navgradient.gif); FLOAT:left; What is happening here and how can I fix it?

    Read the article

  • How to use imported css styles in GWT correctly

    - by Eduard Wirch
    Imagine you created the following simple widget with UiBinder: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style type="my.package.Widget1.Widget1Style"> .childWidgetStyle { border-width: 1px; border-style: dotted; } </ui:style> <g:TextArea styleName="{style.childWidgetStyle}"/> </ui:UiBinder> package my.package; // some imports here public class Widget1 extends Composite { private static Widget1UiBinder uiBinder = GWT.create(Widget1UiBinder.class); interface Widget1UiBinder extends UiBinder<Widget, Widget1> { } public interface Widget1Style extends CssResource { String childWidgetStyle(); } @UiField TextArea textArea; public Widget1(String text) { initWidget(uiBinder.createAndBindUi(this)); textArea.setText(text); } } Than you use this simple widget in another (parent) widget you created: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style> .parentWidgetStyle .childWidgetStyle { margin-bottom: 10px; } </ui:style> <g:VerticalPanel ui:field="listPanel" addStyleNames="{style.parentWidgetStyle}" /> </ui:UiBinder> package my.package; // imports go here public class ParentWidget extends Composite { private static ParentWidgetUiBinder uiBinder = GWT.create(ParentWidgetUiBinder.class); interface ParentWidgetUiBinder extends UiBinder<Widget, ParentWidget> { } @UiField VerticalPanel listPanel; public ParentWidget(final String... texts) { initWidget(uiBinder.createAndBindUi(this)); for (final String text : texts) { final Widget1 entry = new Widget1(text); listPanel.add(entry); } } } What you want to achieve is to get some margin between the Widget1 entries in the list using css. But this won't work. Because GWT will obfuscate the css names. And the obfuscated name for .childWidgetStyle in ParentWidget will be different from the .childWidgetStyle in Widget1. The resulting css will look similar to this: .G1unc9fbE { border-style:dotted; border-width:1px; } .G1unc9fbBB .G1unc9fDa { margin-bottom:10px; } So the margin setting wont apply. How do I do this correctly?

    Read the article

  • display:inline-block and text-indent

    - by Daniele Cruciani
    I am experiencing a problem with the following code in some versions of Internet Explorer: #iconautente{ background-image:url('/style/images/spritecommon.png'); /*icona_utente.png*/ background-position:-117px -15px; text-indent:-9000px; width:20px; height:23px; display:inline-block; } <a id="iconautente" href="/admin/index.php">admin</a> In Firefox, IE7 and IE8 under Vista, I see background and no text, as expected. In IE6 and IE8 under XP, the whole image is indented, not text, so the image is not shown. What should be the right behavior? Is there a workaround?

    Read the article

  • PHP Coding styles return; in switch/case

    - by ArneRie
    Hi , we're trying to implement new coding style guidelines for our team, the php codesniffer is printing an warning on switch case statements when no "break" is found like: switch ($foo) { case 1: return 1; case 2: return 2; default: return 3; } is there any good reason to use : switch ($foo) { case 1: return 1; break; } ?? the break is never reached ?

    Read the article

  • RegEx to extract all HTML tag attributes including inline JavaScript

    - by Mike
    I found this useful regex code here while looking to parse HTML tag attributes: (\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']? It works great, but it's missing one key element that I need. Some attributes are event triggers that have inline Javascript code in them like this: onclick="doSomething(this, 'foo', 'bar');return false;" Or: onclick='doSomething(this, "foo", "bar");return false;' I can't figure out how to get the original expression to not count the quotes from the JS (single or double) while it's nested inside the set of quotes that contain the attribute's value.

    Read the article

  • How to determine UINavigationBar custom view text/shadow color for different styles in UISplitViewCo

    - by Cal
    I have a splitview with a pop over master view using UINavigationController. The problem is I have some custom text views in the header of the nav controller and when it switches to the pop-over view the style of the nav bar changes. This makes the colors of the text clash since they are no longer using the correct settings for the new navbar style. How do you determine the proper default text colors for a given navigation bar (style)? The issue is because I'm using a split view in the iPad but you should be able to determine the proper colors for an iPhone nav bar too.

    Read the article

  • Programmatically clean Word generated HTML while preserving styles?

    - by GeReV
    In my current company, we have this decade old... let's call it a "Hello World" application. While wanting to create a newer version of it, we also want to preserve older entries. These older entries contain hideous Word generated HTML which was never filtered before. If and when we move to a newer system, I'd generally prefer to have that HTML cleaned and filtered in order to have the site comply with HTML standards as much as possible. However, just cleaning that code like Jeff Atwood described in his blog or in any other way I know of would also ruin the style and formatting. Now, that just might cause our users to revolt and then all hell will break loose... Not a very good idea. Question is -- can Word's HTML be cleaned while preserving basic formatting? (e.g: coloring, italicized, bold text and so on) Preferably using publicly available code or library, such as HTML Tidy, examples in C# would be much appreciated. Thanks!

    Read the article

  • Jquery UI: How to define different CSS styles for Tabs and Slider on the same page

    - by Kelvin
    Hello all, I have two elements on the same page that are using the same stylesheet: Jquery Tabs and Jquery Slider. I cannot redefine classes of slider since change of css will affect both elements. Tabs using these classes: ui-tabs ui-widget ui-widget-content ui-corner-all And these are used in Slider: ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all How can I modify slider css without modifying one for tabs? Thanks

    Read the article

  • ASP.net and css styles

    - by c11ada
    can some on help me on how i can reference images i have all my images stored in an image folder which is located in the root folder (..\images) in my css class i have the the following #image { background-position: left; background-repeat: no-repeat;} .background { background-image: (..\images\image.gif); } and in my .cs file i have image.Attributes.Add("class", "background"); image is a div tag which is in my aspx code !! when i run this code i image doesnt show, any ideas what i might be doing wrong

    Read the article

  • javascript removeChild() and appendChild() VS display=none and display=block|inline

    - by Kucebe
    I'm developing a web application that shows some controls and descriptions dinamically (I don't want to use jQuery or other libraries). At this moment i make appear and disappear controls using: element.setAttribute("style", "inline"); and element.setAttribute("style", "none"); but i'm thinking about using: element.appendChild(childRef); and element.removeChild(childRef); So, which one is the best solution in terms of system speed and elegance of the code? (and of course, are there better solution?)

    Read the article

  • silverlight styles

    - by Piyush
    <navigation:Page.Resources> <Style x:Key="PageBackground" TargetType="Grid"> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> <GradientStop Color="White" Offset="1"/> <GradientStop Color="Silver"/> </LinearGradientBrush> <Path x:Name="shinePath" Data="M0,0 L0,300 C-5.5,306.5 40,68 215,0 z" Stretch="Fill" Opacity="0.1"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" SpreadMethod="Pad"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="#00FFFFFF" Offset="0.871"/> </LinearGradientBrush> </Path.Fill> </Path> </Setter.Value> </Setter> </Style> </navigation:Page.Resources> error- property 'Value' is set more then once

    Read the article

  • jQuery - Loading content into div, styles not applied?

    - by Kenny Bones
    Hi! I'm trying to get this content loader to work and I've managed to get it to get new content, once the content is loaded it isn't styled correctly. Also the character "é" becomes a questionmark. Doctype problem? As well as the h2 tag normally having Cufon applied to it is not triggering. So basically, this content loader require me to have a bunch of pages being essentially the same, except for the content I want to retreice. This way, users can use the actual URL as you'd normally exect. Only when a link is clicked on an already loaded page, it's only the content from the #content div that's realle being replaced. I can post code here, but I think it's better to just watch it happen on the testpage. It's very low on graphics btw ;) http://www.matkalenderen.no Just click the blue text link and you'll see it. Also, the red button on the second loaded content is supposed to revert the content back to previous. But it's not being triggered or something. What's happening?

    Read the article

  • phpbb specific forum page styles

    - by Ryan Max
    I am using phpbb on a site for a client, and the client has requested that each different forum page have a different background color. Such functionality is not built into phpbb (from what I can tell), so how should I go about doing this? Can I modify the code of phpbb directly? My other thought was to use a js conditional statement, but seeing as the only difference on the forums page would be the page title, I don't know how I could format this.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >