Search Results

Search found 922 results on 37 pages for 'h2'.

Page 18/37 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Apply a specific class to the first item in a series with PHP

    - by Thomas
    I have a php script that echoes a series of uploaded images and I need to apply a class to the first image echoed in the series. Is this possible? For example, if I want to display 10 images and apply a class to only the first image, how would I go about it? Here is the code, I am working with: <div id="gallery"> <?php query_posts('cat=7'); while(have_posts()) { the_post(); $image_tag = wp_get_post_image('return_html=true'); $resized_img = getphpthumburl($image_tag,'h=387&w=587&zc=1'); $url = get_permalink(); $Price ='Price'; $Location = 'Location'; $title = $post->post_title; echo "<a href='$url'><img src='$resized_img' width='587' height='387' "; echo "rel=\"<div class='gallery_title'><h2>"; echo $title; echo "</h2></div>"; echo "<div class='pre_box'>Rate:</div><div class='entry'>\$"; echo get_post_meta($post->ID, $Price, true); echo "</div><div class='pre_box'>Location:</div><div class='entry'>"; echo get_post_meta($post->ID, $Location, true); echo "</div>\""; echo "'/></a>"; echo ""; } ?> On line 13, the code looks like this: echo "<a href='$url'><img src='$resized_img' width='587' height='387' "; For the first item only, I need it to look like this: echo "<a href='$url' class='show'><img src='$resized_img' width='587' height='387' ";

    Read the article

  • IE7: container of hidden Div displays incorrectly

    - by dmr
    There is a search box div that contains a boxhead div and a boxbody div. Inside the boxbody div, there is a searchToggle div. When the user clicks a certain link on the page, the display style property of the searchToggle div is toggled between block and none. The 2 background-images for the body of the search box are set via the css of the searchBox div and the boxbody div. In IE7, when the searchToggle div is hidden, the background-image from the searchBox div extends on the left more than it should. It shows up correctly when the display of the searchToggle div is block. Everything show up correctly, in both cases in IE8 and FF. Any ideas why this is happening? The relevant HTML: <div class="searchBox"> <div class="boxhead"> <h2></h2> </div> <div class="boxbody"> <div id="searchToggle" name="searchToggle"> </div> </div> </div> The relevant CSS: .searchBox { margin: 0 auto; width: 700px; background: url(/images/myImageRight-r.gif) no-repeat bottom right; font-size: 100%; text-align: left; overflow: hidden; } .boxbody { margin: 0; padding: 5px 30px 31px; background-image: url(/images/myImageLeft.gif); background-repeat: no-repeat; background-position: left bottom; }

    Read the article

  • Liquid Layout: 100% max-width img not applied - why?

    - by MEM
    I'm totally new to this liquid layout stuff. I've notice, as most of us, that while most of my layout components "liquify", images, unfortunately, don't. So I'm trying to use the max-width: 100% on images as suggested on several places. However, and despite the definition of max-width and min-height of the img container, the img don't scale. Sample code: CSS img { max-width: 100%; } article { float: left; margin: 30px 1%; max-width: 31%; min-height: 350px; } HTML <article> <header> <h2>some header</h2> </header> <img src="/images/thumb1.jpg" alt="thumb"> <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin vel ante a orci tempus eleifend.</p> </article> Please have a look on the following link: http://tinyurl.com/d849f8x If you see it on a wide resolution, you will notice that the "kid image", for example, don't scale. Any clue about what could the issue be, why does that image not scale? Test case: Browsers: Firefox 15.0 / Chrome 21.0 IOS: MAC OS X Lion - 10.7.3 Resolution: 1920x1200 What I get: I get an image that doesn't scale until the end of it's container. The img width won't fit the article element that contains it. What I do expect: I expect the image to enlarge, until it reaches the end it's container. Visually, I'm expecting the image to be as wide as the paragraph immediately below, in a way that, the right side of the image stays vertically aligned with the right side of the paragraph below.

    Read the article

  • Floated element not included in parent, causing margin-bottom problems

    - by Christian Mann
    Right, so I've got a section of a page: <div class="article"> <div class="author"> <img src="images/officers/john_q_public_thm.jpg" /> <span class="name">John Q. Public</span> <span class="position">President</span> </div> <abbr class="postdate"> <span class="month m-01">Jan</span> <span class="day d-31">31</span> <span class="year y-2009">2009</span> </abbr> <div class="content"> <h2 class="title">Article Title</h2> <p>Pellentesque habitant morbi...facilisis luctus, metus</p> <p>Pellentesque habitant morbi...facilisis luctus, metus</p> </div> </div> <div class="article">...</div> <div class="article">...</div> The author and abbr divs are floated to the left. Each one of these article divs needs to be separated from its siblings by 5px or so. However, the author div is extending beyond the technical "height" of the div. The margin-bottom is doing nothing, as the space is being taken up by the floated author. This is somewhat difficult to envision, so I've placed it on my web server Is there any way to force the parent to be at least as tall as all of the floated elements within? If anyone figures out what I'm saying, thanks.

    Read the article

  • Retrieving models from form with ModelMultipleChoiceField

    - by colinjameswebb
    I am having difficulties with forms, specifically ModelMultipleChoiceField. I've pieced together this code from various examples, but it sadly doesn't work. I would like to be able to: Search for some Works on work_search.html Display the results of the search, with checkboxes next to each result Select the Works I want, via the checkboxes After pressing Add, display which works were selected. I believe everything is okay except the last part. The page simply displays "works" :( Here is the code - sorry about the length. Models.py class Work(models.Model): title = models.CharField(max_length=200) artist = models.CharField(max_length=200) writers = models.CharField(max_length=200) def __unicode__(self): return self.title + ' - ' + self.artist forms.py class WorkSelectForm(forms.Form): def __init__(self, queryset, *args, **kwargs): super(WorkSelectForm, self).__init__(*args, **kwargs) self.fields['works'] = forms.ModelMultipleChoiceField(queryset=queryset, widget=forms.CheckboxSelectMultiple()) views.py def work_search(request): query = request.GET.get('q', '') if query: qset = ( Q(title__icontains=query) | Q(artist__icontains=query) | Q(writers__icontains=query) ) results = Work.objects.filter(qset).distinct() form = WorkSelectForm(results) return render_to_response("work_search.html", {"form": form, "query": query }) else: results = [] return render_to_response("work_search.html", {"query": query }) def add_works(request): #if request.method == POST: form = WorkSelectForm(request.POST) #if form.isvalid(): items = form.fields['works'].queryset return render_to_response("add_works.html", {"items":items}) work_search.html {% extends "base.html" %} {% block content %} <h1>Search</h1> <form action="." method="GET"> <label for="q">Search: </label> <input type="text" name="q" value="{{ query|escape }}"> <input type="submit" value="Search"> </form> {% if query %} <h2>Results for "{{ query|escape }}":</h2> <form action="add_works" method="post"> <ul> {% if form %} {{ form.as_ul }} {% endif %} </ul> <input type="submit" value="Add"> </form> {% endif %} {% endblock %} add_works.html {% extends "base.html" %} {% block content %} {% if items %} {% for item in items %} {{ item }} {% endfor %} {% else %} <p>Nothing selected</p> {% endif %} {% endblock %}

    Read the article

  • wordpress -> showing custom data from child pages + pagination

    - by GaVrA
    Hello! You can see here what i am doing: http://www.arvag.net/otkrijte-svet/leto/ So its pulling 2 custom fields from child pages, one of them is just url for the image on the left, and the other field is that text showing on the right. Now, what i want to do is to add pagination there. The code i have now will just simply show all child pages, but i want to show only 5 child pages, so if user want to see 6th child page he would have to click on link for "Page 2" and so on. The code im using to display these child pages is this: <?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_title&sort_order=desc'); $count = 0; foreach($pages as $page) { $short_info = get_post_meta($page->ID,'info',true); $image = get_post_meta($page->ID,'slika',true); $count++; ?> <div class='preview_slika left'><img src="<?php echo $image ?>" alt="<?php echo $page->post_title ?>" /></div> <div class='preview_info right'> <h2><?php echo $page->post_title ?></h2> <p><?php echo $short_info ?></p> <a href="<?php echo get_page_link($page->ID) ?>">Više o >></a> </div> <div class='clear'></div> <?php } ?> So any idea what to do to get what i need?

    Read the article

  • ASP.net MVC Routing on Postback

    - by Mark Kadlec
    In my ASP.net MVC View I have a dropdown that I want to get details on selection and asynchronously update a div. My aspx is as follows: <% using (Html.BeginForm("Index", "Portal", FormMethod.Post, new { id = "TheForm" })) {%> <h2>Index</h2> <% using (Ajax.BeginForm("Details", new AjaxOptions { UpdateTargetId = "mpkResults" })) { %> <%=Html.DropDownList("Docs", (IEnumerable<SelectListItem>)ViewData["Docs"], new { onchange = "document.getElementById('TheForm').submit();" })%> <p><input type="submit" value="Details" /></p> <% } %> <div id="mpkResults" style="margin:10px 0px 0px 0px;"></div> ... The onchange event fires correctly on selection of the dropdown, but instead of the Details method in my code behind firing, it hits my Index method. Why is the details method not getting hit on the onchange event? My Details() method in the controller is: public ActionResult Details() { ... < It never gets here, just goes to the index() method } It's a little frustrating right now since I'm sure it is a simple mistake but not sure what it could be. I looked at the Source of my page and sure enough, the form looks like it should be routing to the Details Action: <form action="/Portal/Details" method="post" ... Any help would be appreciated.

    Read the article

  • JSF dynamic ui:include

    - by Ray
    In my app I have tutor and student as roles of user. And I decide that main page for both will be the same. But menu will be different for tutors and users. I made to .xhtml page tutorMenu.xhtml and student.xhtml. And want in dependecy from role include menu. For whole page I use layout and just in every page change content "content part" in ui:composition. In menu.xhtml <h:body> <ui:composition> <div class="menu_header"> <h2> <h:outputText value="#{msg['menu.title']}" /> </h2> </div> <div class="menu_content"> <?:if test="#{authenticationBean.user.role.roleId eq '2'}"> <ui:include src="/pages/content/body/student/studentMenu.xhtml"/> </?:if> <?:if test= "#{authenticationBean.user.role.roleId eq '1'}"> <ui:include src="/pages/content/body/tutor/tutorMenu.xhtml" /> </?:if> </div> </ui:composition> I know that using jstl my be not better solution but I can't find other. What is the best decision of my problem?

    Read the article

  • Setting <td> value using jquery

    - by timk
    Hello, I have the div structure shown below. For the second <td> in the table i want to replace &nbsp; with a hyperlink whose href attribute is stored in the variable myLink. How can i do this with jquery ? Please help. Thank You. <div class="pbHeader"> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td class="pbTitle"> <h2 class="mainTitle">Transfer Membership</h2> </td> <td> &nbsp; </td> </tr> </tbody> </table> </div>

    Read the article

  • How to Alphabetize a CSS file in Vim

    - by Kev
    I get a CSS file: div#header h1 { z-index: 101; color: #000; position: relative; line-height: 24px; margin-right: 48px; border-bottom: 1px solid #dedede; font-size: 18px; } div#header h2 { z-index: 101; color: #000; position: relative; line-height: 24px; margin-right: 48px; border-bottom: 1px solid #dedede; font-size: 18px; } I want to Alphabetize lines between the {...} div#header h1 { border-bottom: 1px solid #dedede; color: #000; font-size: 18px; line-height: 24px; margin-right: 48px; position: relative; z-index: 101; } div#header h2 { border-bottom: 1px solid #dedede; color: #000; font-size: 18px; line-height: 24px; margin-right: 48px; position: relative; z-index: 101; } I map F7 to do it nmap <F7> /{/+1<CR>vi{:sort<CR> But I need to press F7 over and over again to get the work done. If the CSS file is big, It's time-consuming & easily get bored. I want to get the cmds piped. So that, I only press F7 once! Any idea? thanks!

    Read the article

  • What is the difference between .get() and .fetch(1)

    - by AutomatedTester
    I have written an app and part of it is uses a URL parser to get certain data in a ReST type manner. So if you put /foo/bar as the path it will find all the bar items and if you put /foo it will return all items below foo So my app has a query like data = Paths.all().filter('path =', self.request.path).get() Which works brilliantly. Now I want to send this to the UI using templates {% for datum in data %} <div class="content"> <h2>{{ datum.title }}</h2> {{ datum.content }} </div> {% endfor %} When I do this I get data is not iterable error. So I updated the Django to {% for datum in data.all %} which now appears to pull more data than I was giving it somehow. It shows all data in the datastore which is not ideal. So I removed the .all from the Django and changed the datastore query to data = Paths.all().filter('path =', self.request.path).fetch(1) which now works as I intended. In the documentation it says The db.get() function fetches an entity from the datastore for a Key (or list of Keys). So my question is why can I iterate over a query when it returns with fetch() but can't with get(). Where has my understanding gone wrong?

    Read the article

  • PHP - print content from file after manipulation

    - by ludicco
    Hello there, I'm struggling trying to read a php file inside a php and do some manipulation..after that have the content as a string, but when I try to output that with echo or print all the php tags are literally included on the file. so here is my code: function compilePage($page,$path){ $contents = array(); $menu = getMenuFor($page); $file = file_get_contents($path); array_push($contents,$menu); array_push($contents,$file); return implode("\n",$contents); } and this will return a string like <div id="content> <h2>Here is my title</h2> <p><? echo "my body text"; ?></p> </div> but this will print exactly the content above not compiling the php on it. So, how can I render this "compilePage" making sure it returns a compiled php result and not just a plain text? Thanks in advance

    Read the article

  • Wordpress is_front_page if statement

    - by Anders Kitson
    I have the following code below. I am trying to get rid of the box articles div when I am on the home page the code works when the html is outside of the else portion of the IF statement, as soon as I put it inside the page goes blank, I can't seem to figure out where I have broken the code. Any help would be great. <?php if(is_front_page()) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } else{ ?> <div class="box articles"> <div class="block" id="articles"> <h2><?php the_title(); ?></h2> <div class="article"> <div class="entry"> <?php the_content(); ?> </div> <?php edit_post_link('Modifca Contenuto.', '<p>', '</p>'); ?> </div> </div> </div> <?php endwhile; endif; ?> <? } ?>

    Read the article

  • How are you supposed to layout a page in VS2010 without using tables?

    - by CrustyApple
    I have been using .NET since beta and HTML since the days of HotDog pro & notepad, using table layout of course. I am FINALLY ready to use only div, li, CSS for the layout, but my question is, what is the proper way to layout pages in VS2010? When i use table layout its simple and i can visually see what im creating and where the elements are, such as the sample below - how should I do this using div's, etc in VS2010? <table width="300" border="0" cellpadding="5"> <tr> <td><img src="http://assets.devx.com/MS_Azure/azuremcau.jpg" alt="blah" width="70" height="70" /></td> <td><h2>This is some text to the right of the picture...</h2></td> </tr> <tr> <td colspan="2">Here some text underneath</td> </tr> </table>

    Read the article

  • Perl 500 internal server error. Something wrong with my code.

    - by Nitish
    I get a 500 internal server error when I try to run the code below in a web server which supports perl: #! /usr/bin/perl use LWP; my $ua = LWP::UserAgent->new; $ua->agent("TestApp/0.1 "); $ua->env_proxy(); my $req = HTTP::Request->new(POST => 'http://www.google.com/loc/json'); $req->content_type('application/jsonrequest'); $req->content('{ "cell_towers": [{"location_area_code": "55000", "mobile_network_code": "95", "cell_id": "20491", "mobile_country_code": "404"}], "version": "1.1.0", "request_address": "true"}'); my $res = $ua->request($req); if ($res->is_success) { print $res->content,"\n"; } else { print $res->status_line, "\n"; return undef; } But there is no error when I run the code below: #! /usr/bin/perl use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD><TITLE>Hello World!</TITLE></HEAD>\n"; print "<BODY>\n"; print "<H2>Hello World!</H2> <br /> \n"; foreach $key (sort keys(%ENV)) { print "$key = $ENV{$key}<p>" ; } print "</BODY>\n"; print "</HTML>\n"; So I think there is some problem with my code. When I run the first perl script in my local machine with the -wc command, it says that the syntax is OK. Help me please.

    Read the article

  • Saving a form using autocomplete instead of select field

    - by Jason Swett
    I have a form that looks like this: <%= form_for(@appointment) do |f| %> <% if @appointment.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@appointment.errors.count, "error") %> prohibited this appointment from being saved:</h2> <ul> <% @appointment.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> </div> <% end %> <%= f.fields_for @client do |client_form| %> <div class="field"> <%= client_form.label :name, "Client Name" %><br /> <%= client_form.text_field :name %> </div> <% end %> As you can see, the field for @client is a text field as opposed to select field. When I try to save my form, I get this error: Client(#23852094658120) expected, got ActiveSupport::HashWithIndifferentAccess(#23852079773520) That's not surprising. It seems to me that it was expecting a select field, which it could translate into a Client object, but instead it just got a string. I know I can do Client.find( :first, :conditions => { :name => params[:name] } ) to find a Client with that name, but how do I tell my form that that's what's going on?

    Read the article

  • When to use @Singleton in a Jersey resource

    - by dexter
    I have a Jersey resource that access the database. Basically it opens a database connection in the initialization of the resource. Performs queries on the resource's methods. I have observed that when I do not use @Singleton, the database is being open at each request. And we know opening a connection is really expensive right? So my question is, should I specify that the resource be singleton or is it really better to keep it at per request especially when the resource is connecting to the database? My resource code looks like this: //Use @Singleton here or not? @Path(/myservice/) public class MyResource { private ResponseGenerator responser; private Log logger = LogFactory.getLog(MyResource.class); public MyResource() { responser = new ResponseGenerator(); } @GET @Path("/clients") public String getClients() { logger.info("GETTING LIST OF CLIENTS"); return responser.returnClients(); } ... // some more methods ... } And I connect to the database using a code similar to this: public class ResponseGenerator { private Connection conn; private PreparedStatement prepStmt; private ResultSet rs; public ResponseGenerator(){ Class.forName("org.h2.Driver"); conn = DriverManager.getConnection("jdbc:h2:testdb"); } public String returnClients(){ String result; try{ prepStmt = conn.prepareStatement("SELECT * FROM hosts"); rs = prepStmt.executeQuery(); ... //do some processing here ... } catch (SQLException se){ logger.warn("Some message"); } finally { rs.close(); prepStmt.close(); // should I also close the connection here (in every method) if I stick to per request // and add getting of connection at the start of every method // conn.close(); } return result } ... // some more methods ... } Some comments on best practices for the code will also be helpful.

    Read the article

  • PHP active page code - I can't figure out parse error

    - by dmschenk
    I'm trying to build an active page menu with PHP and MySQL and am having a difficult time fixing the error. In the while statement I have an if statement that is giving me fits. Basically I think I'm saying that "thispage" is equal to the "title" based on pageID and as the menu is looped through if "thispage" is equal to "title" then echo id="active". Thanks <?php mysql_select_db($database_db_connection, $db_connection); $query_rsDaTa = "SELECT * FROM pages WHERE pagesID = 4"; $rsDaTa = mysql_query($query_rsDaTa, $db_connection) or die(mysql_error()); $row_rsDaTa = mysql_fetch_assoc($rsDaTa); $totalRows_rsDaTa = mysql_num_rows($rsDaTa); $query_rsMenu = "SELECT * FROM menu WHERE online = 1 ORDER BY menuPos ASC"; $rsMenu = mysql_query($query_rsMenu, $db_connection) or die(mysql_error()); $thisPage = ($row_rsDaTa['title']); ?> <link href="../css/MainStyle.css" rel="stylesheet" type="text/css" /> <h2><?php echo $thisPage; ?></h2> <div id="footcontainer"> <ul id="footlist"> <?php while($row_rsMenu = mysql_fetch_assoc($rsMenu)) { echo (" <li" . <?php if ($thisPage==$row_rsDaTa['title']) echo id="active"; ?> . "<a href=\"../" . $row_rsMenu['menuURL'] . "\">" . $row_rsMenu['menuName'] . "</a></li>\n"); } echo "</ul>\n"; ?> </div> <?php mysql_free_result($rsMenu); mysql_free_result($rsDaTa); ?>

    Read the article

  • How to open links in new window ONLY IF the check box is checked

    - by Travis
    Here is what i have so far. I have it so they open in new windows, but i want it only if the check box is checked... <!DOCTYPE html> <html> <head> <script> function new() { if ( document.getElementById('checkbox').checked ) window.open( 'y', 'n', 't', 'New Window' ); } else { break; } var OpenNew = document.getElementById('opennew'); OpenNew.addEventListener('click', OpenWin, false ); </script> </head> <body> <p> <form name="test"> <p>Open link in a new window &nbsp; <input type="checkbox" id="checkbox" name="check" /></p> </form> </p> <p> <h2>My favorite Websites to visit</h2> <a href="http://www.youtube.com" target="new" id="y">Youtube</a><br /> <a href="http://www.newegg.com" target="new" id="n">Newegg</a><br /> <a href="http://www.twitch.tv" target="new" id="t">Twitch.tv</a><br /> </p> </body> </html> I am unsure how to actually do the if statement if it is checked then open. It does currently open in a new tab.. i just need it to be only when its checked. Any help with this will be greatly appreciated! Thanks!

    Read the article

  • Launch a new page in Zend/php on button click

    - by BlueMonster
    PHP & Zend Noob here I've downloaded the skeleton project from here: https://github.com/zendframework/ZendSkeletonApplication Say i want to open a new page that simply displays "hello world" text if click on the "ZF2 Development Portal" button(bottom left green button) on the page that launches --- how do i do this? See image: I've read through this tutorial, but i'm not sure how the model, view, or controller are actually launched? See tutorial: http://blog.wilgucki.pl/2012/07/tworzenie-modulw-w-zend-framework-2.html From looking at the code, i know that i will have to change this line of code: <div class="span4"> <h2><?php echo $this->translate('Follow Development') ?></h2> <p><?php echo sprintf($this->translate('Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!'), '<a href="http://framework.zend.com/wiki/display/ZFDEV2/Home">', '</a>', '<a href="http://framework.zend.com/zf2/blog">', '</a>', '<a href="http://framework.zend.com/issues/browse/ZF2">', '</a>') ?></p> <p><a class="btn btn-success" href="http://framework.zend.com/zf2" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p> </div> More specifically this line: <p><a class="btn btn-success" href="http://framework.zend.com/zf2" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p> but i'm really confused as to what i'm supposed to change it to in order to launch a new page. Any ideas? Thanks in advance!

    Read the article

  • Howto: Access a second related model in a nested attribute builder block

    - by Joe Cairns
    I have a basic has_many through relationship: class Foo < ActiveRecord::Base has_many :bars, :dependent => :destroy has_many :wtfs :through => :bars accepts_nested_attributes_for :bars, :wtfs end On my crud forms I have a builder block for the wtf, but I need the label to come from the bar (an attribute called label for instance). What's the proper method to do this? Here's the most simple scaffold: <h1>New foo</h1> <% form_for(@foo) do |f| %> <%= f.error_messages %> <p> <%= f.label :name %><br /> <%= f.text_field :name %> </p> <h2>Bars</h2> <% f.fields_for :wtfs do |builder| %> <%= builder.hidden_field :bar_id %> <p> <%= builder.text_field :wtf_data_i_need_to_set %> </p> <% end %> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', foos_path %>

    Read the article

  • Php string handling triks

    - by Dam
    Hi my question Need to get the 10 word before and 10 words after for the given text . i mean need to start the 10 words before the keyword and end with 10 word after the key word. Given text : "Twenty-three" The main trick : content having some html tags etc .. tags need to keep that tag with this content only . need to display the words from 10before - 10after content is bellow : <div id="hpFeatureBoxInt"><h3><a href="/go/homepage/i/int/news/world/1/-/news/1/hi/world/europe/8592190.stm">Suicide bombings hit Moscow Metro</a></h3><p>Past suicide bombings in Moscow have been blamed on Islamist rebels At least 35 people have been killed after two female suicide bombers blew themselves up on Moscow Metro trains in the morning rush hour,<h2><span class="dy">Top News Story</span></h2> officials say.<img height="150" width="201" alt="Emergency services carry a body from a Metro station in Moscow (29 March 2010)" src="http://wwwimg.bbc.co.uk/feedengine/homepage/images/_47550689_moscowap203_201x150.jpg">Twenty-three died in the first blast at 0756 (0356 GMT) as a<a href="#"> train stood </a>at the central Lubyanka station, beneath the offices of the FSB intelligence agency.About 40 minutes later, a second explosion ripped through a train at Park Kultury, leaving another 12 dead.No-one has said they carried out the worst attack in the capital since 2004. </p><p id="fbilisten"><a href="/go/homepage/i/int/news/heading/-/news/">More from BBC News</a></p></div> Thank you

    Read the article

  • jQuery - Toggle CSS Background Image Expand/Close

    - by urbanrunic
    I am looking for a way to change the back ground image on toggle as in this questions here: jQuery - Toggle Image Expand/Close My issue is I have this html: <button id="close-menu"></button> <div id="menu-bar"> <div class="wrapper"> <a href="http://www.website.com" target="_blank"> <img src="image.png" alt=""> </a> <div class="options"> <h2>eBlast Tools</h2> <ul> <li class="toggle-images">Images are <span>enabled</span>. Click to disable.</li> <li class="download-zip"><a href="download.zip">Download ZIP File</a></li> </ul> </div> </div> </div> and this is my current jquery: $('#close-menu').click(function() { $('#menu-bar').slideToggle(400); return false; }); and this is the css: #close-menu { background: url(../img/minus-button.png); background-position: top left; width: 25px; height: 25px; position: absolute; top: 10px; right: 20px; z-index: 100; border: none; } #close-menu:hover { background: url(../img/minus-button.png); background-position: bottom left; }

    Read the article

  • How do I extract this value using PHP Dom

    - by mathew
    Hello I do have html file this is just a prt of it though... <div id="result" > <div class="res_item" id="1" h="63c2c439b62a096eb3387f88465d36d0"> <div class="res_main"> <h2 class="res_main_top"> <img src="/ff/gigablast.com.png" alt="favicon for gigablast.com" width=16 height=16 />&nbsp; <a href="http://www.gigablast.com/" rel="nofollow" > Gigablast </a> <div class="res_main"> <h2 class="res_main_top"> <img src="/ff/ask.com.png" alt="favicon for ask.com" width=16 height=16 />&nbsp; <a href="http://ask.com/" rel="nofollow" > Ask.com - What&#039;s Your Question? </a>.... I want extract only url address (for example: http://www.gigablast.com and http://ask.com/ - there are atleast 10 urls in that html) from above using PHP Dom Document..I know up to this but dont know how to move ahead?? $doc = new DomDocument; $doc->loadHTMLFile('urllist.html'); $data = $doc->getElementById('result'); then what?? this is inside tag hence I cant use $data->getElementsByTagName() here!! any help??

    Read the article

  • Wordpress is_front_page if statment

    - by Anders Kitson
    I have the following code below. I am trying to get rid of the box articles div when I am on the home page the code works when the html is outside of the else portion of the IF statement, as soon as I put it inside the page goes blank, I can't seem to figure out where I have broken the code. Any help would be great. <?php if(is_front_page()) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } else{ ?> <div class="box articles"> <div class="block" id="articles"> <h2><?php the_title(); ?></h2> <div class="article"> <div class="entry"> <?php the_content(); ?> </div> <?php edit_post_link('Modifca Contenuto.', '<p>', '</p>'); ?> </div> </div> </div> <?php endwhile; endif; ?> <? } ?>

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >