i need to show one row's words vertically, for that i've created a class in my stylesheet containing text-orientation:sideways then applied it on the tr , but it won't seem to work, i'm a bit new to CSS so maybe someone could help please
this it the table row
echo "<tr class='vert'>";
and this is the stylesheet
table tr.vert{
text-orientation: sideways;
}
You seem to be missing the writing-mode property..
The text-orientation CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when writing-mode is not horizontal-tb). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers.
MDN
span {
writing-mode: vertical-rl;
text-orientation:sideways;
}
<span>Writing Mode</span>
Related
I need to edit the result of $_filter->getHtml() function.
The $_filter->getHtml() returns an HTML content with ul and li combination for product attributes and I want to apply some modifications to this block.
What I want exactly is to convert some color names (e.g. red) to theirs hex equivalent (FF0A0A).
Do you have any idea on how to change the block contents?
I found the solution :
The output of $_filter->getHtml() can be found in app/design/frontend/base/default/template/catalog/layer/filter.phtml (filter items).
How to check if a cell has a bottom border using PHPexcel? I am working on a very funky template the sales force of my company have assembled.
The lines could go on and on inside the "Why?" block so that is why I need to check for that last bottom border to move on in my loop.
Example:
This will check the entire G column until it is empty
NumCells = Range("G" & Rows.Count).End(xlUp).Row +1
If Range("G" & NumCells).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
*Continue with code
I ended up using something like this (didn't really find the bottom border a reliable solution). This will just simply grab the data inside of the following cell ranges (B25:B29):
$objPHPExcel->setActiveSheetIndex($sheetIndex)->rangeToArray('B25:B29');
I've got a fiddle with the data here:
http://jsfiddle.net/ktpmm5/Z5z8n/
and page is staged here:
http://steppingstonez.com/daretorepair/magazines.php
Basically my paging element gets shoved to the left and lays over top of my heading. This happens only in IE 8 - works fine in Chrome, FF and Opera. I'm going crazy trying to figure out what is wrong. html validates fine.
Any ideas?
Quick solution:
To make it roughly work, change the paging wrapper to have the position: relative, and float the ul.paging right (remove the position).
You'll need to add height into the head_text to include the paging wrapper (as paging_wrapper is now positioned out of the flow, so its height does not count).
Longer solution:
Even with the fix above, you still have the problem that a long title will overlap regardless, so I would define the area/width of the header (making it wrap if too long) and also restrict the area of the paging device (by limiting number of buttons that show).
Another quick solution: Specify the correct width for your .paging CSS class (UL). For example a width of 220px seems correct.
.paging {
...
...
width: 220px; /* new */
}
I think it seems more of an issue with utilizing negative margins. You have both a margin-top on the paging_wrapper and the paging li a. This is probably causing some weirdness for support in IE.
I have a select tag with a lot of options. Every option has a name and a date which both should be printed in every <option>.
I want to align the list like this:
Name Date
Name Date
Name Date
Since every name has different length, I wrote this code:
//Start of the option text//
//Always print 20 characters, even if the name is longer//
print ">".substr($eventsArr[$j]->GetName(),0 ,20);
//If the name is shorter then 20 chars//
if(strlen($eventsArr[$j]->GetName()) < 20)
{
//Add missing chars (20 - the length of the string) with spaces//
for($t = 0; $t < 20 - (strlen($eventsArr[$j]->GetName())); $t++)
{
print " ";
}
}
print "" .$newDate."</option>\n"; //Then print the date//
I'm getting the correct amount of spaces completed. But as you can see, the alignment is not 100%:
I'm guessing its because every letter has a different width in pixels. So... Is there any way of doing this kind of alignment ? Thanks.
Just use a Monospaced font for this. It's what they were designed for.
Option elements were not meant to be formatted that way. Using a monospace font would be the way to achieve alignment, but that would make the text look ugly, and monospace fonts are less readable, too. Moreover, not all browsers honor font family settings for option elements; for example, IE 9 does not.
The workaround, or alternative approach, is to use a set of radio buttons instead of a select element. Then you can use a table:
<table>
<tr><td><input type=radio id=a1> <label for=a1>Name</label>
<td>Date
...
</table>
This handles the alignment, and this also lets you specify the font used for the labels in a manner that works across browsers.
If there is a large number of alternatives, you might consider setting a height and vertical scrolling for the table. But it might be better to let users just scroll down the page as needed, instead of having two levels of scrolling.
I have a variable, inside there's a long sentence:
$myvar = 'i am a quite long sentence, more than 500 chars';
With css, I echo it, and I get 3 lines of text.
echo '<p>'.$myvar.'</p>';
How do I set css line height to it, cause it seems when I echo the query my line-height of 12px is ignored.
Any ideas?
Not sure I was very clear with my q.
P.S. Yes, didn't know how to explain :). Sorry... The variable gets it's value from an xml field... and, how can i explain, its echo'ed like a big chunk of teext, ignoring the styles
There are several ways to set the line-height, the easiest way is
echo '<p style="line-height:12px">'.$myVar.'</p>';
A more elegant way would be to define a class or set for all your paragraph tags a line-height.
I. css global line-height for all paragraph tags
p {line-height: 12px}
II. css file with class for line height
p.foo {line-height: 12px}
corresponding php code
echo '<p class="foo">'.$myVar.'</p>';