Search Results

Search found 1265 results on 51 pages for 'stylesheet'.

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

  • Adding StyleSheets Programmatically in Asp.Net

    - by Braveyard
    I want to add StyleSheets programmatically in the head section but one of the examples I saw seemed to need to many lines of code to add just one style sheet even though I may need a lot: Example Code: HtmlLink css = new HtmlLink(); css.Href = "css/fancyforms.css"; css.Attributes["rel"] = "stylesheet"; css.Attributes["type"] = "text/css"; css.Attributes["media"] = "all"; Page.Header.Controls.Add(css); I also use Page.Header.RenderControl() method but it didn't work either. Object null something error was thrown. I also used Page.Header.InnerHtml and InnerText += "<link .... "/> things but they threw the Literal error which is I think common error. I used this code : List<Literal> cssFiles = new List<Literal>(); cssFiles.Add(new Literal() { Text = @"<link href=""" + ResolveUrl("~/Resources/Styles/MainMaster/MainDesign.css") + @""" type=""text/css"" rel=""stylesheet"" />" }); cssFiles.Add(new Literal() { Text = @"<link href=""" + ResolveUrl("~/Resources/Styles/MainMaster/MainLayout.css") + @""" type=""text/css"" rel=""stylesheet"" />" }); AddStyleRange(cssFiles); private void AddStyleRange(List<Literal> cssFiles) { foreach (Literal item in cssFiles) { this.Header.Controls.Add(item); } } It worked at first but when I change the pages it stopped working. I am using Master Page and I am writing these codes on Master.cs file and also some people recommended to use this.Header instead of Page.Header but when I built it throws an error which says I cannot declare that like this. It shouldn't be that hard to add many styles. It is getting complicated.

    Read the article

  • IE6 PNG-transparency CSS hack not working

    - by John
    I looked around and decided to use a CSS approach rather than rely on JS... I figure the kind of corporate users stuck with IE6 might also have JS disabled by IT departments. So In my HTML I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>My Page</title> <link rel="stylesheet" type="text/css" href="default.css" /> <!--[if IE 6]><link rel="stylesheet" type="text/css" href="ie6.css"><![endif]--> </head> <body> <img src="media/logo.png"/> </body> Then my ie6.css consists simply of: img { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...); } However none of this makes the slightest difference, no transparency. I commented out all the rest of the page so it is literally that one and still no luck. I removed the default.css stylesheet and still no difference.

    Read the article

  • Apache - "dynamic" rewrite rule

    - by Christian A. Rasmussen
    Hi there. I'm working on a Zend Framework project where I've stumbled across a bit of a problem. The problem originates from the fact that modules are 2nd class citizens in Zend Framework. In my project, I'd like for each module to have a folder containing files which are to be accessed from the outside - files such as stylesheets, javascripts and images. Now, how is this to be done. With a Zend Framework project I have a folder structure which looks like this: application/ modules/ moduleOne/ public/ stylesheet.css moduleTwo/ moduleThree/ public/ index.php The standard .htaccess file located in the public/ folder holds this: SetEnv APPLICATION_ENV development RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] The way it works, is that the project's apache DocumentRoot is the public/ folder. All requests gets redirected through the index.php file where Zend Framework's router component takes over. Now, I'm by no means an expert with Apache nor mod_rewrite so pardon me if this is just silly. I imagine that I implement an extra step in the existing rewrite rule so that if I request http://project/public/moduleOne/stylesheet.css it will for instance resolve to /var/www/project/application/modules/moduleOne/public/stylesheet.css. So the steps which need to be done is to check if the first element in the URI is public/ if it is, we take the next segment as the modules name and use that in the path we're trying to resolve to and attempt to serve the file. Is this at all possible or does anyone have a better suggestion? Thank you for your time Christian Rasmussen

    Read the article

  • jQuery UI datepicker will not display - full code included

    - by Bill Brasky
    I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/ I believe I downloaded all of the proper files, but to be certain, I started from scratch and ripped the demo site. Not all of it, but what I believed to be the important parts. The result is no datepicker to be shown and no javascript errors. Here is my full code sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript" charset="utf-8"> jQuery(function(){ jQuery("#datepicker").datepicker(); }); </script> </head> <body> <input type="text" id="datepicker" class="hasDatepicker" /> </body> </html> Any help would be very much appreciated. Thanks!

    Read the article

  • SimpleModal can't bind event onShow

    - by Higgs Boson
    Hi All I can't seem to get this working, some help would be greatly appreciated. I have a page with the following code: $('.editname').click(function (e) { var src = "test.html"; $.modal('<iframe src="' + src + '" height="480" width="640" style="border:0">', { closeHTML:"<div class='no simplemodal-close'>Close</div>", containerCss:{ backgroundColor:"#fff", border:"10px solid #333", height:480, padding:"10px", width:640 }, opacity:50, overlayCss: {backgroundColor:"#fff"}, onShow: function (dialog) { $('.saveit', dialog.data[0]).click(function () { // close the dialog $.modal.close(); }); } }); }); The code for test.html (the contents of the modal window) is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/layout.css" rel="stylesheet" type="text/css" /> <link href="css/text.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Test</h1> <div class='pointer spacertop'><a href="#" class="saveit">Save</a></div> </body> </html> The modal window appears, however clicking on the Save button (class saveit) in the modal window does not fire the click function. It does nothing. Please help. Thank you in advance.

    Read the article

  • Why won't my styles show in a Dynamics CRM 4 IFRAME?

    - by Dan Crowther
    I have created a web page (ASP.NET) that includes a stylesheet to mimic Dynamics CRM styles. This is to be used in a CRM IFRAME (within a form). The stylesheet is referenced as follows: <head id="Head1" runat="server"> <link href="Styles.css" rel="stylesheet" type="text/css" /> </head> When I load the page in Visual Studio, all is well. When I load it in CRM, none of the styles are shown and no images are displayed. If I browse directly to the image, I get a 404 error. However, the pages function correctly. I have set read permissions for "Everyone" on the server to see if that was causing a problem but it didn't help. I also tried putting a plain HTML page in the folder and that won't load either - again a 404. The page is installed in the ISV folder ..../isv/MyProject. Can anyone help? EDIT This is on a multi-tenancy system. On my test company (testcompany) if I browse to http://crm/testcompany/isv/MyProject/MyPage.aspx, the page is loaded (without styles and images). If I browse to http://crm/testcompany/isv/MyProject/TestImage.gif, the image is not shown. If I browse to http://crm/isv/MyProject/TestImage.gif, the image is shown. Does this suggest a problem with the server setup and the way CRM messes around with virtual directories?

    Read the article

  • Forward slash problem in xsl and xsql

    - by Peter Kaleta
    Hi I have simple xsql <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="zad1.xsl" ?> <page xmlns:xsql="urn:oracle-xsql" connection="java:comp/env/jdbc/mondialDS"> <xsql:query max-rows="-1" null-indicator="no" tag-case="lower" rowset-element="continents"> select name as continent from mondial_user.Continent order by 1 </xsql:query> </page> which gives me a list of continents with "australia/oceania" among them i use XSL on above xsql : <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Root template --> <res> <xsl:template match="/continents"> <xsl:for-each select="row"> <re> <xsl:value-of select="continent"/> </re> </xsl:for-each> </xsl:template> </res> </xsl:stylesheet> Firefox throws an error on "wrong formated xml document" with: AfricaAmericaAsiaAustralia/OceaniaEurope -----------------------------------^ Help appreciated.

    Read the article

  • django - variable declared in base project does not appear in app

    - by unsorted
    I have a variable called STATIC_URL, declared in settings.py in my base project: STATIC_URL = '/site_media/static/' This is used, for example, in my site_base.html, which links to CSS files as follows: <link rel="stylesheet" href="{{ STATIC_URL }}css/site_tabs.css" /> I have a bunch of templates related to different apps which extend site_base.html, and when I look at them in my browser the CSS is linked correctly as <link rel="stylesheet" href="/site_media/static/css/site_tabs.css" /> (These came with a default pinax distribution.) I created a new app called 'courses' which lives in the ...../apps/courses folder. I have a view for one of the pages in courses called courseinstance.html which extends site_base.html just like the other ones. However, when this one renders in my browser it comes out as <link rel="stylesheet" href="css/site_tabs.css" /> as if STATIC_URL were equal to "" for this app. Do I have to make some sort of declaration to get my app to take on the same variable values as the project? I don't have a settings.py file for the app. by the way, the app is listed in my list of INSTALLED_APPS and it gets served up fine, just without the link to the CSS file (so the page looks funny). Thanks in advance for your help.

    Read the article

  • Does Internet Explorer 7 have a CSS parsing issue with the "background-image" property?

    - by user312003
    Having CSS layout issues with Internet Explorer 7 (big surprise). Upon using the Developer Tools to inspect the CSS, I discovered that some properties defined in the stylesheet are not appearing in the parsed CSS structure... THEN I saw THIS being shown as the parsed value for the background-image property: background-image : url(/trunk/httpdocs/images/layout/HCBL_Homepage_01.jpg); WIDTH: 1200px; pretty much obliterating the width that was defined property. The actual code in the CSS file for this element: div#header { width: 1200px; height: 100px; margin-left: auto; margin-right: auto; background-image: url('/trunk/httpdocs/images/layout/HCBL_Homepage_01.jpg'); background-repeat: no-repeat; } If anyone could offer any insight, or provide a link describing this problem (and maybe a workaround...) I would be very appreciative. Also, I am only interested in this from a parsing of the stylesheet and CSS syntax perspective. I am not concerned with rendering and display issues at the moment; I simply want to get IE 7 (and I have a feeling IE 6 will have similar issues) to recognize and parse ALL of the CSS properties that have been defined in the stylesheet. Thanks in advance guys!

    Read the article

  • How to sort an XML file by date in XLST

    - by AdRock
    I am trying to sort by date and get an error message about the stylesheet can't be loaded I found an answer on how others have suggested but it doesn't work for me Here is where it is supposed to sort. The commented out line is where the sort should occur <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template name="hoo" match="/"> <html> <head> <title>Registered Festival Organisers and Festivals</title> <link rel="stylesheet" type="text/css" href="userfestival.css" /> </head> <body> <h1>Registered Festival Organisers and Festivals</h1> <xsl:for-each select="folktask/member"> <xsl:if test="user/account/userlevel='3'"> <!--<xsl:sort select="concat(substring(festival/event/datefrom,1,4),substring(festival/event/datefrom, 6,2),substring(festival/event/datefrom, 9,2))" data-type="number" order="ascending"/>--> Sample node from XML <festival id="1"> <event> <eventname>Oxford Folk Festival</eventname> <url>http://www.oxfordfolkfestival.com/</url> <datefrom>2010-04-07</datefrom> <dateto>2010-04-09</dateto> <location>Oxford</location> <eventpostcode>OX1 9BE</eventpostcode> <coords> <lat>51.735640</lat> <lng>-1.276136</lng> </coords> </event> </festival>

    Read the article

  • How to get the output of an XslCompiledTransform into an XmlReader?

    - by Graham Clark
    I have an XslCompiledTransform object, and I want the output in an XmlReader object, as I need to pass it through a second stylesheet. I'm getting a bit confused - I can successfully transform some XML and read it using either a StreamReader or an XmlDocument, but when I try an XmlReader, I get nothing. In the example below, stylesheet is my XslCompiledTransform object. The first two Console.WriteLine calls output the correct transformed XML, but the third call gives no XML. I'm guessing it might be that the XmlTextReader is expecting text, so maybe I need to wrap this in a StreamReader..? What am I doing wrong? MemoryStream transformed = new MemoryStream(); stylesheet.Transform(input, args, transformed); transformed.Position = 0; StreamReader s = new StreamReader(transformed); Console.WriteLine("s = " + s.ReadToEnd()); // writes XML transformed.Position = 0; XmlDocument doc = new XmlDocument(); doc.Load(transformed); Console.WriteLine("doc = " + doc.OuterXml); // writes XML transformed.Position = 0; XmlReader reader = new XmlTextReader(transformed); Console.WriteLine("reader = " + reader.ReadOuterXml()); // no XML written

    Read the article

  • DocType xhtml1-transitional.dtd ignores table cell height

    - by Sameer Shariff
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <link href="Stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <table style="height: 100%; width: 100%;"> <tr> <td colspan="2" style="height: 100px;">Header</td> </tr> <tr> <td style="width: 180px;">Links</td> <td>Content</td> </tr> <tr> <td colspan="2" style="height: 25px;">Footer</td> </tr> </table> </body> </html> Stylesheet.css looks as follows: * { margin: 0; padding: 0; } html, body { height: 100%; width: 100%; } Row 1 and 3 above have fixed heights. Row 3 is not filling the remaining space. If i omit the doctype, it works as expected. I need to use this doctype. Please help! Thanks!

    Read the article

  • XSL Reuse? YES! But: Element must not contain an xsl:import element! :-(

    - by Fedor Steeman
    I am using a heavy stylesheet with a lot of recurring transformations, so I thought it would be smart to reuse the same chunks of code, so I would not need to make the same changes at a bunch of different places. So I discovered , but -alas- it won't allow me to do it. When trying to run it in Sonic Workbench I get the following error: An xsl:for-each element must not contain an xsl:import element This is my stylesheet code: <xsl:template match="/"> <InboundFargoMessage> <EdiSender> <xsl:value-of select="TransportInformationMessage/SenderId"/> </EdiSender> <EdiReceiver> <xsl:value-of select="TransportInformationMessage/RecipientId"/> </EdiReceiver> <EdiSource>PORLOGIS</EdiSource> <EdiDestination>FARGO</EdiDestination> <Transportations> <xsl:for-each select="TransportInformationMessage/TransportUnits/TransportUnit"> <xsl:import href="TransportCDMtoFDM_V0.6.xsl"/> </xsl:for-each> <xsl:for-each select="TransportInformationMessage/Waybill/TransportUnits/TransportUnit"> <xsl:import href="TransportCDMtoFDM_V0.6.xsl"/> </xsl:for-each> </Transportations> </InboundFargoMessage> </xsl:template> </xsl:stylesheet> I will leave out the child xsl-sheets for now, as the problem appears to be happening at the base. If I cannot use xsl:import, is there any option of reuse?

    Read the article

  • How to let one external stylsheet selectively overrule the other

    - by Ferdy
    I'm stunned by a simple thing that I want to accomplish but does not work. I have a website and I want it to support themes, which are a named set of CSS + images. No matter which theme is selected, I always include the main CSS file, which is the default theme. On top of that I'm loading a second stylesheet, the one that is theme-specific, like so: <link rel="stylesheet" type="text/css" href="css/main.css" title=main" media="screen" /> <link rel="stylesheet" type="text/css" href="themes/<?= $style ?>/css/<?= $style ?>.css" title="<?= $style ?>" media="screen" /> My idea is that the theme specific css should not be a full copy of the main css file. Instead, it should only contain CSS rules that overrule those of the main.css file. This makes themes much smaller and easier to maintain. I thought I could simply load two external stylesheets after each other and that for conflicting rules it will always use the theme specific css, the second file. However, it does not seem to work. If I make a dramatic styling change in the theme file then it has no effect. If I then comment the main CSS file, the theme CSS does have effect. Was I too naive in expecting this to work like this? I know I can use inline styles to overrule anything, but I prefer a setup like this if possible.

    Read the article

  • Wordpress: How to override all default theme CSS so your custom one is loaded the last?

    - by mickael
    I have a problem where I've been able to include a custom css in the section of my wordpress theme with the following code: function load_my_style_wp_enqueue_scripts() { wp_register_style('my_styles_css', includes_url("/css/my_styles.css")); wp_enqueue_style('my_styles_css'); } add_action('wp_enqueue_scripts','load_my_style_wp_enqueue_scripts'); But the order in the source code is as follows: <link rel='stylesheet' id='my_styles_css-css' href='http://...folderA.../my_styles.css?ver=3.1' type='text/css' media='all' /> <link rel="stylesheet" id="default-css" href="http://...folderB.../default.css" type="text/css" media="screen,projection" /> <link rel="stylesheet" id="user-css" href="http://...folderC.../user.css" type="text/css" media="screen,projection" /> I want my_styles_css to be the last file to load, overriding default and user files. I've tried to achieve this by modifying wp_enqueue_style in different ways, but without any success. I've tried: wp_enqueue_style('my_styles_css', array('default','user')); or wp_enqueue_style('my_styles_css', false, array('default','user'), '1.0', 'all'); I've seen some related questions without answer or with these last 2 methods that are still failing for me. The function above is part of a plugin that I've got enabled in my wordpress installation.

    Read the article

  • Filemaker XSL Select Column By Name

    - by Kevin Sylvestre
    I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <people> <xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW"> <person> <name> <xsl:value-of select="fm:COL[01]/fm:DATA"/> </name> <location> <xsl:value-of select="fm:COL[02]/fm:DATA"/> </location> </person> </xsl:for-each> </people> </xsl:template> </xsl:stylesheet> Any ideas? Thanks.

    Read the article

  • [solved] IE6 PNG-transparency CSS hack not working

    - by John
    I looked around and decided to use a CSS approach rather than rely on JS... I figure the kind of corporate users stuck with IE6 might also have JS disabled by IT departments. So In my HTML I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>My Page</title> <link rel="stylesheet" type="text/css" href="default.css" /> <!--[if IE 6]><link rel="stylesheet" type="text/css" href="ie6.css"><![endif]--> </head> <body> <img src="media/logo.png"/> </body> Then my ie6.css consists simply of: img { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...); } However none of this makes the slightest difference, no transparency. I commented out all the rest of the page so it is literally that one and still no luck. I removed the default.css stylesheet and still no difference. EDIT: I now got it working, using the .htc method, loading that file in a conditional IE6 test block. It turned out the problem I was having was that Windows 7 had 'locked' the file (I don't even know what this means) and this blocked IE from loading/using it.

    Read the article

  • XSLT: insert parameter value inside of an html attribute

    - by usr
    How to make the following code insert the youtubeId parameter: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:YouTube="urn:YouTube" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library YouTube"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="videoId"/> <xsl:template match="/"> <a href="{$videoId}">{$videoId}</a> <object width="425" height="355"> <param name="movie" value="http://www.youtube.com/v/{$videoId}&amp;hl=en"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/{$videoId}&amp;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed> </object>$videoId {$videoId} {$videoId} <xsl:value-of select="/macro/videoId" /> </xsl:template> </xsl:stylesheet> As you can see I have experimented quite a bit. <xsl:value-of select="/macro/videoId" /> actually outputs the videoId but all other occurences do not. This must be an easy question to answer but I just cannot get it to work.

    Read the article

  • Letter spacing issue with 'overlapping' character

    - by Wesz-T
    I'm having some trouble with a font I found on Google Web Fonts. As you can see in the image posted below, the capital V in 'Versus' overlaps with the 'e' when i'm using Firefox. Though when i'm using Chrome (or IE) it does not overlap and leaves me with an ugly space between the two characters. Is there any way to fix this and make it look like the one in Firefox? Or should I start looking for another font? My HTML: <html> <head> <meta charset="utf-8"> <title>Versus</title> <link rel="stylesheet" type="text/css" href="css/reset.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link href='http://fonts.googleapis.com/css?family=Marck+Script' rel='stylesheet' type='text/css'> </head> <body> <div> <h1>Versus</h1> </div> </body> My CSS: h1 { font-family: 'Marck Script', cursive; font-size: 100px; color:#444; text-align:center; padding:0 50px; text-shadow: 2px 2px 3px #777; } Thanks in advance!

    Read the article

  • CSS Zebra Stripe a Specific Table tr:nth-child(even)

    - by BillR
    I want to zebra stripe only select tables using. I do not want to use jQuery for this. tbody tr:nth-child(even) td, tbody tr.even td {background:#e5ecf9;} When I put that in a css file it affects all tables on all pages that call the same stylesheet. What I would like to do is selectively apply it to specific tables. I have tried this, but it doesn't work. // in stylesheet .zebra_stripe{ tbody tr:nth-child(even) td, tbody tr.even td {background:#e5ecf9;} } // in html <table class="zebra_even"> <colgroup> <col class="width_10em" /> <col class="width_15em" /> </colgroup> <tr> <td>Odd row nice and clear.</td> <td>Some Stuff</td> </tr> <tr> <td>Even row nice and clear but it should be shaded.</td> <td>Some Stuff</td> </tr> </table> And this: <table> <colgroup> <col class="width_10em" /> <col class="width_15em" /> </colgroup> <tbody class="zebra_even"> The stylesheet works as it is properly formatting other elements of the html. Can someone help me with an answer to this problem? Thanks.

    Read the article

  • How to align text at the top left-hand corner?

    - by OverTheRainbow
    I'd like to use stylesheet instead of hard-coding HTML so that text within cells are aligned vertically, ie. text starts at the upper left-hand corner. However, neither of this works: <head> <link rel="STYLESHEET" href="display.css" type="text/css"> <style> td {vertical-align:top; font-size:x-small} td {vertical-align:text-top; font-size:x-small} </style> </head> Does someone know? Thank you. Edit: Problem solved. Turns out the HTML editor I'm using is a bit old and didn't display things as expected, but they do show OK in a modern browser with "vertical-align:top".

    Read the article

  • XSL-FO: Force Wrap on Table Entries

    - by Ace
    I'm having an issue where when I publish my modspecs to pdf (XSL-FO). My tables are having issues, where the content of a cell will overflow its column into the next one. How do I force a break on the text so that a new line is created instead? I can't manually insert zero-space characters since the table entries are programmatically entered. I'm looking for a simple solution that I can just simply add to docbook_pdf.xsl (either as a xsl:param or xsl:attribute) EDIT: Here is where I'm at currently: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:import href="urn:docbkx:stylesheet"/> ...(the beginning of my stylesheet for pdf generation, e.g. header and footer content stuff) <xsl:template match="text()"> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="."/> </xsl:call-template> </xsl:template> <xsl:template name="intersperse-with-zero-spaces"> <xsl:param name="str"/> <xsl:variable name="spacechars"> &#x9;&#xA; &#x2000;&#x2001;&#x2002;&#x2003;&#x2004;&#x2005; &#x2006;&#x2007;&#x2008;&#x2009;&#x200A;&#x200B; </xsl:variable> <xsl:if test="string-length($str) &gt; 0"> <xsl:variable name="c1" select="substring($str, 1, 1)"/> <xsl:variable name="c2" select="substring($str, 2, 1)"/> <xsl:value-of select="$c1"/> <xsl:if test="$c2 != '' and not(contains($spacechars, $c1) or contains($spacechars, $c2))"> <xsl:text>&#x200B;</xsl:text> </xsl:if> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="substring($str, 2)"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> With this, the long words are successfully broken up in the table cells! Unfortunately, the side effect is that normal text elsewhere (like in a under sextion X) now breaks up words so that they appear on seperate lines. Is there a way to isolate the above process to just tables? EDIT #2 here is what the fo spits out for a single table... <fo:table-row><fo:table-cell padding-start="2pt" padding-end="2pt" padding-top="2pt" ... </fo:block></fo:table-cell></fo:table-row>

    Read the article

  • EXSLT date:format-date template without document() XSLT 1.0

    - by DashaLuna
    Hello guys, I'm using date:format-date template EXSLT file I'm using XSLT 1.0 and MSXML3.0 as the processor. My date:format-date template EXSLT file's declaration is: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tui="http://www.travelbound.co.uk/" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="msxsl tui date" version="1.0"> ... </xsl:stylesheet> I cannot use document() function due to the 3rd party restrictions. So I have changed the months and days (similarly) from XML snippet: <date:months> <date:month length="31" abbr="Jan">January</date:month> <date:month length="28" abbr="Feb">February</date:month> <date:month length="31" abbr="Mar">March</date:month> <date:month length="30" abbr="Apr">April</date:month> <date:month length="31" abbr="May">May</date:month> <date:month length="30" abbr="Jun">June</date:month> <date:month length="31" abbr="Jul">July</date:month> <date:month length="31" abbr="Aug">August</date:month> <date:month length="30" abbr="Sep">September</date:month> <date:month length="31" abbr="Oct">October</date:month> <date:month length="30" abbr="Nov">November</date:month> <date:month length="31" abbr="Dec">December</date:month> </date:months> to the variable: <xsl:variable name="months"> <month length="31" abbr="Jan">January</month> <month length="28" abbr="Feb">February</month> <month length="31" abbr="Mar">March</month> <month length="30" abbr="Apr">April</month> <month length="31" abbr="May">May</month> <month length="30" abbr="Jun">June</month> <month length="31" abbr="Jul">July</month> <month length="31" abbr="Aug">August</month> <month length="30" abbr="Sep">September</month> <month length="31" abbr="Oct">October</month> <month length="30" abbr="Nov">November</month> <month length="31" abbr="Dec">December</month> </xsl:variable> And correspondingly, I've changed the code that originally uses document() function from: [from month processing bit of EXSLT stylesheet] <xsl:variable name="month-node" select="document('')/*/date:months/date:month[number($month)]" /> to use MSXML3.0 node-set function: <xsl:variable name="month-node" select="msxsl:node-set($months)/month[number($month)]" /> So I assumed that this would work. According to the EXLT instructions "The format pattern string is interpreted as described for the JDK 1.1 SimpleDateFormat class." [I used current version]. I'm specifing the month in accordance to SimpleDateFormat class as 'dd MMMMM yyyy' so that the month will be the full month's name, for example January. But it doesn't work :( I've looked in EXSLT stylesheet and it has got the logic to do that. Also there is logic to display the name of the week for a day using 'E' pattern, which doesn't work for me. Maybe changing from using document() to variables broke it. Would really appreciate any help. Many thanks!

    Read the article

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