I have never had a problem with a media query like this before. Normally, it just does something unexpected, but not nothing. I don't need help with the actual effect, just as to why it isn't seeing the query. If you inspect the code, it is just not there. I referenced several other posts, but I have it formatted the same as far as I can tell, syntax wise.
Here is my HTML:
<div id="content_main">
<div id="bottom">
<div id="discord">
<div id="header_headset">
<h1>See who's online:</h1>
<div id="headset"></div>
</div>
<iframe src="https://discordapp.com/widget?id=90178023529127936&theme=dark" width="320" height="500" allowtransparency="true" frameborder="0"></iframe>
</div>
<div id="news_announcements">
<h1>News and Announcements</h1>
<p>First and formost, welcome to CommonRoomGaming.com. If you are new here, just find a game you have that you want to play with others, and just jump onto one of our servers! You can find detailed connection instructions on each games page.</p>
<div id="News_Events">
<ul>
<li>ECO Server Woes</li>
<li>New Server Incoming!</li>
<li>2/14/17 - Site Launched</li>
</ul>
</div>
</div>
<div id="S_A_G">
<div id="sad_dragon"></div>
<div id="sag_comments">
<h2>Not playing your favorite game?</h2>
<p>Here at CommonRoomGaming.com we don't discriminate against any games. If you want to play a game, odds are others have it and want to play it too! So with that said, if you don't see your favorite game listed, feel free to suggest it by letting us know in the below form.</p>
</div>
<div id="SAG_form">
<FORM action="emailit.html" method="POST">
<TABLE border="0" width="100%">
<TR>
<TD>Your name and/or handle:</TD>
</TR>
<TR>
<TD>
<INPUT type="text" size="30" maxlength="40" name="name"></INPUT>
</TD>
</TR>
<TR>
<TD>Your email address:</TD>
</TR>
<TR>
<TD>
<INPUT type="text" size="30" maxlength="127" name="email"></INPUT>
</TD>
</TR>
<TR>
<TD>Your message:</TD>
</TR>
<TR>
<TD>
<TEXTAREA name="message" rows="4" cols="50" style="width:300px" ></TEXTAREA>
</TD>
</TR>
</TABLE>
<P>
<INPUT type="submit" value="Make it so."></INPUT>
</P>
</FORM>
</div>
</div>
</div>
</div>
And here is my media query:
#media screen and (max-width:500px){
#bottom {
width:350px;
display:block;
margin-right:auto;
margin-left:auto;
}
}
Here is my codepen of the whole document link
Again, I only need to know what I am doing wrong with the media query. Ignore anything unrelated, as it is all changing.
Problem was related to DNS Caching.
Related
I am using drupal and super happy with a live edit field module. However this module has been developed with ajax functionality which works brilliantly but seems to still force a button form wrapper fields. I can use CSS to hide this field which works great but the button field ID and wrapper are generic and takes buttons away from the rest of the site. The button wrapper etc are generated by the Drupal CMS of which edits are way out of my scope of understanding.
<div class="form-actions form-wrapper" id="edit-actions"><input type="submit" id="edit-submit" name="op" value="Save" class="form-submit"></div>
I am trying to hide with
`
div#edit-actions.form-wrapper {
display: none;
}
`
But this is hiding relevant buttons that need to be used elsewhere in the site. Here is some of the container code.
`
<div class="content">
<div class="view view-account-content view-id-account_content view-display-id-block_1 view-dom-id-b611690449f4a19aecf257c830f8b956 jquery-once-1-processed refresh-processed">
<div class="view-content">
<div class="views-form"><form action="/testdev/" method="post" id="views-form-account-content-block-1" accept-charset="UTF-8"><div><input type="hidden" name="form_build_id" value="form-ycIZQs2NnfOiNp4mkOR_11YB656wl-cYbXdlo8Cidwk">
<input type="hidden" name="form_token" value="phM-fFmZ9Y6mbpN-0fXff-cfwKo5JvbVdmhYt40dyNc">
<input type="hidden" name="form_id" value="views_form_account_content_block_1">
<table class="rwcls2 views-table cols-0">
<tbody>
<tr class="odd rwcls views-row-first views-row-last">
<td class="views-field views-field-name">
admin </td>
<td class="noneed views-field-editablefield">
<div><div id="editablefields-field-company" class="editablefield-item editablefield-processed"><div class="field field-name-field-company field-type-list-text field-label-hidden compbutton"><div class="field-items"><div class="field-item even">C2</div></div></div><input class="editablefield-edit editablefield-edit-hover form-submit ajax-processed" type="submit" id="edit-field-company-0-actions-edit" name="edit-field_company-0" value="Edit this field" style="display: none;">Edit this field</div></div> </td>
</tr>
</tbody>
</table>
<div class="form-actions form-wrapper" id="edit-actions"><input type="submit" id="edit-submit" name="op" value="Save" class="form-submit"></div></div></form></div> </div>
</div> </div>
`
Any advise for a new coder would be great. Thanks
I have tried css display none
I have tried adding classes to the field in both form and drupal views
I'm trying to build a settings for my WordPress plugin, I want my image to be displayed aside the table on the right, but it always goes to bottom can you guys help me to fix that ?
<form action="options.php" method="post">');
<div class="row">
<div class="col-md-8">
<table class="form-table">
<tbody>
<tr>
<th scope="row"><label for="">test</label></th>
<td>
<input name="x'.$key.'" value="'.$option['x'.$key].'" width="50px">
<button type="button" onclick="position('.$key.')" class="button button-primary">Create/Edit</button>
<p class="description" id="">some discription</p>
</td>
</tr>
<tr>
<th scope="row"><label for="">test</label></th>
<td>
<input name="myinput" value="'.$option['x'.$key].'" width="50px">
<button type="button" onclick="position('.$key.')" class="button button-primary">Create/Edit</button>
<p class="description" id="">some discription</p>
</td>
</tr>
....
</tbody>
</table>
</div>
<div class="col-md-4">
<div id="special">
<canvas id="the-canvas" style="border:1px solid black"></canvas>
</div>
</div>
</div>
// outputs the WP submit button html
//#submit_button();
Add a div element with "container" or "container-fluid" class after form element( <form action="options.php" method="post"> )
like :<form action="options.php" method="post"><div class="container">
...............
</div></form>
OR
like :<form action="options.php" method="post"><div class="container-fluid">
...............
</div></form>
<div class="row-fluid">
<table class="s-table table table-bordered table-striped table-hover">
<thead class="p-table-head">
<tbody class="p-table-body">
<tr>
<td>
<td>
<td>
<td>
<td>
<td>
<td>
<td>
<td>
<td>
<div id="div_2_1_2_1_1_1_10_r9" class="Action_Group CoachView CoachView_show" data- eventid="" data-viewid="Action_Group1" data-config="config_div_2_1_2_1_1_1_10_r9" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_9e739df9_ccc7_4dfa_9b75_8233150ad5bc.Action_Group">
<div id="div_2_1_2_1_1_1_10_1_r9" class="ContentBox" data-view-managed="true" style="display: none;"> </div>
<div class="s-action-group clearfix">
<div class="l-nodeId" style=" display: none; "></div>
<div class="p-action-group">
<div id="div_2_1_2_1_1_1_10_1_1_r9" class="Action CoachView CoachView_show" data- eventid="boundaryEvent_10" data-viewid="Action3" data-config="config_div_2_1_2_1_1_1_10_1_1_r9" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_9e739df9_ccc7_4dfa_9b75_8233150ad5bc.Action" style="background-color: transparent;">
<button id="div_2_1_2_1_1_1_10_1_1_r9-lnk" type="button" style="display: none;">
<a class="p-action-link" href="#action" title="">
<i style="display: none;"></i>
<span style="background-color: transparent;">Select</span>
</a>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
I have tried with the following different x path expression its works fine in Firefox but in IE browser it is not working?.
//tbody[#class='p-table-body']/tr/td[10]/div/div/div/div/a/span
//table[#class='s-table table table-bordered table-striped table- hover']/tbody/tr[1]/td[10]/div/div/div[2]/div/a/span
//*[#id='div_2_1_2_1_1_1_10_1_1_r9']/a/span
Note : i have tried to execute scripts it is not fail but main issue it is not recognizing
select link of a customer.
Try
//*[#id='div_2_1_2_1_1_1_10_1_1_r9-lnk']/a/span
to click on select
Not sure if it can help, but try selecting just the 'a' element, instead. There's no need to select also the span element, as far as I can understand. E.g.:
By.cssSelector("#div_2_1_2_1_1_1_10_1_1_r9 a.p-action-link")
Also, a couple of recommendations.
Try to avoid xpath selectors, and write css selectors instead. See selenium-docs
While writing a selector, you should not be too strict. "/tr/td[10]/div/div/div/div" is considered bad practice.
See Writing reliable locators for Selenium and WebDriver tests
Try to identify the element by using the text identifier
driver.findElement(By.xpath("//a/span[text()='Select']")).click();
I'm having troubles aligning things in a table row. I have an hyperlink and an inline-form made up of one textbox and one button.
The problem is that the button goes to the next line instead of being aligned with the textbox. The problem occurs in Chrome, but it works fine in IE10
I use twitter bootstrap for css. This jsfiddle illustrates the problem : http://jsfiddle.net/Tq9Qm/
Can you help me ?
the code of jsfiddle:
<table class="view-header">
<tbody>
<tr>
<td> <span>Edition du mandat </span>
</td>
<td>
<div class="pull-right"> <a style="float: left;">
<span class="pointer">more options</span>
</a>
<form class="form-inline" placeholder="N° de contrat, nom/numéro de client">
<input class="input-xxlarge ng-dirty" type="text" placeholder="N° de contrat, nom/numéro de client" ng-model="model" />
<button disabled="disabled" class="btn btn-info" type="submit" ng-click="searchMethod()" ng-disabled=" ! canSearch()"><i class="icon-search"></i> Rechercher</button>
</form>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="pull-right">
<!-- uiIf: filterVisible -->
</div>
</td>
</tr>
</tbody>
Use pull-left it's attribute for twitter boot-strap
FiddleDemo
Nav Documentation
Try pull-left in your form
Demo
try the pull-left attribute
it will helps you
I have this div that is showing the products for an e-commerce site.
I have it well alligned with css and a table inside it, but using tables for content seems to be frowned upon/not the best so I'm trying to do it correctly, hasn't worked out so far. The products div looks like this:
Crude unedited screenshot : http://img255.imageshack.us/img255/6832/printt.png
That is the look I want. I tried nesting 2 divs in the products div, one floating right with the image, title and description, the other one floating right with the table elements.
Thought I had worked it out to a decent look on some pages, but on others (displaying other products) it looks different and messed up. I'm thinking this is due to the fact the links were taking on the width of the whole products div, ending up over the right div.
How do I stop that behavior, I want the links to wrap around the text maybe the problem would go away then. Or are you suggesting something else?
HTML looks like this :
<div id="products">
<img src="fetch.php?id=4" width="129" height="129" alt="PRC200" />
<h3>PRC200</h3>
<table border="0">
<tr>
<td><h4>100,00 RON</h4></td>
</tr>
<tr>
<td class="out">Indisponibil</td>
</tr>
<form action="" method="post">
<tr>
<td><input type="image" src="images/button_basket.jpg" name="submit_cos" width="118" height="25" /></td>
</tr>
</form>
<form action="detalii.php" method="get">
<tr>
<td>
<input type="hidden" name="id_produs" value="4" />
<input type="image" src="images/button_details.jpg" name="submit_detalii" width="118" height="25" />
</td>
</tr>
</form>
</table>
<p>M-am saturat de atatea litere si numere</p>
</div>
Here is a tableless solution. Keep in mind take the tags and place them in an external CSS file. By using a tableless structure you'll see how much more condensed the code is.
<style>
.product { border:1px solid red; padding:10px; }
.productimg { float:left; padding-right:15px; }
.purchasedetails { float:right; padding-left:15px; }
</style>
<div id="products">
<div class="product">
<div class="purchasedetails">
<h4>100,00 RON</h4>
<p>Indisponibil</p>
<input type="image" src="images/button_basket.jpg" name="submit_cos" width="118" height="25" /><br />
<input type="image" src="images/button_details.jpg" name="submit_detalii" width="118" height="25" />
</div>
<div class="productimg"><img src="fetch.php?id=4" width="129" height="129" alt="PRC200" /></div>
<h3>PRC200</h3>
<p class="description">Insert Description Here</p>
<div style="clear:both;"></div>
</div>
</div>
I only have this nexted inside the <div id="products"> because it was listed in your code. The inside products div would essentailly fill whatever content area it is placed in whether it is a <td> or<div>