Hi,
I know "position: absolute" will pop an element from the "flow of HTML/CSS" and it stops interacting with its neighbors. What other ways are there to achieve this?
Round two. First was "How do I get all supported CSS properties in WebKit?".
I'm looking for magic CSSkeywords function:
CSSkeywords('float') --> ['left', 'right', 'none']
CSSkeywords('width') --> ['auto']
CSSkeywords('background') --> [
["repeat", "repeat-x", "repeat-y", "no-repeat"],
["scroll", "fixed"],
["top", "center", "bottom", "left"],
/*regexp for color*/,
/*regexp for url*/,
"none"
]
hi all
what basic tips should we observe in design web pages(html/css/javascript) for having highest compatibility with most browsers(IE-firefox-opera-chrome-safari)?
thanks
I've been searching and i can't find any ff addons or javascript for finding unused css in ajax apps.
dust-me selectors
can do a site-crawl, but i'm looking for something that examines loaded-in content...
I'd like something where i can press 'record' and then make a load of clicks which will check off the used selectors, and hoping to find an existing one rather than try to write my own with jquery!
Just made a site using great standards compliant semantic HTML and CSS. It looks great in Gecko, Web Kit, but IE7 mangles it (of course). Any progress yet on this front, or do I have to go through a tonne of hacks as is standard with IE.
I am trying to figure out how I want to handle settings in my PHP app. I have pretty much decide that I would like to use a Confg class file so it will be autoloaded and flexible in the future. Below is some stuff I was playing with.
I know you cannot set a variable to popluate a Constant so I then try to use a public static property.
Why can I not set public static $ip = $_SERVER['REMOTE_ADDR']; ??
<?php
// config.class.php
class Config
{
const URL = 'http://www.foo.com';
const DB_User = 'dbname';
public static $test = 'test string';
public static $ip = $_SERVER['REMOTE_ADDR'];
}
///////////////////////////////////////////////////////
//index.php
// works
echo Config::URL;
// works
echo Config::$test;
// DOES NOT WORK
echo Config::$ip;
?>
I want to show ... when overflow happens,
but sadly in css there is only overflow:hidden which is near but not exact what I want.
Is it possible to implement it ?
I'm trying to create an overload of the System.Console.ReadLine() method that will take a string argument. My intention basically is to be able to write
string s = Console.ReadLine("Please enter a number: ");
in stead of
Console.Write("Please enter a number: ");
string s = Console.ReadLine();
I don't think it is possible to overload Console.ReadLine itself, so I tried implementing an inherited class, like this:
public static class MyConsole : System.Console
{
public static string ReadLine(string s)
{
Write(s);
return ReadLine();
}
}
That doesn't work though, cause it is not possible to inherit from System.Console (because it is a static class which automatically makes is a sealed class).
Does it make sense what I'm trying to do here? Or is it never a good idea to want to overload something from a static class?
What are cons if we do not care about validation of XHTML and CSS?
In terms of development time,
Code debugging,
Cross browser compatibility,
website maintainability,
Future changes in website,
SEO ranking
Accessibility (Does validity increase
accessibility)
I have to explain a client that Code validation is not just Fashion, it is beneficial for his site.
*Its only Debug-time error, but a very weird one.
Problem:
While running with Debugger attached and calling a method, exposed in separate Portable library, returning ConfiguredTaskAwaitable, we get InvalidProgramException.
Repro:
Having 2 projects:
PortableClassLibrary (supporting .Net 4.5; Windows Store; Windows Phone 8)
with 1 class:
public class Weird
{
public static ConfiguredTaskAwaitable GetConfiguredTaskAwaitable()
{
return new ConfiguredTaskAwaitable();
}
}
ConsoleApplication with code:
static void Main(string[] args)
{
Weird.GetConfiguredTaskAwaitable();
}
Notes:
replacing ConfiguredTaskAwaitable with ConfiguredTaskAwaitable<T> (a generic version) fixes this strange issue
consuming this method form WP8 or Win8 app under Debugger works fine.
Currently it causes problems cause I cant run my Unit Tests under Debugger. I'm forced to change my "ObjectUnderTest" implementation
to return generic ConfiguredTaskAwaitable<T>, which is fine for the real project, but still is only a workaround.
The Question is:
does anybody knows the reason of this error? It definitely related to Portable Class Library magic.
How to make this css code cross browser compatible using jquery. this code only works on firefox and IE8. i wan to use in IE6 and 7 also.
ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}
What useful css classes do you u keep in your stylesheet? to use in every project. and with semantic names.
is right-bdr, bdr-bottom2px are good class names
Hi. :)
Apart from the global.css i'm including in my header.php, i would also like to load certain page-content specific styles.
But since my <head></head> is already covered by my header file, and i don't wish to resort to inlines, what is the best way to place the styles on the specific page?
Thanks ! :D
I am following w3c schools to learn XSLT. in An example. In-line styling is performed here.
How can I link an external (CSS) style sheet to style HTML compliant tags?
OK so I now know there is a way to put all my php files in a single place and have them be able to be included without a filepath by setting an include_path like so:
php_value include_path .:/pathToPHPFiles
OK so now as long as my PHP files are in this directory I can include them from any subdirectory as if they were in the same directory.
I am wondering if there is a trick like this for other file types like .css and .js so I can put them all in single location and embed them in a page without worring about the filepath?
I have this html:
<div class="object-box">
<img ... />
<span class="caption">This is the caption</span>
</div>
Which is accompanied with this CSS:
.object-box .caption, .object-box img {
display: block;
}
.object-box {
border: 1px solid;
}
I would like the surrounding div to shrink-wrap to its contents. I can achieve this by using float: ... or display: inline-block. However, I'd also like it to be centered on the page, using margin: auto. The two approaches don't seem to be compatible.
Is it possible to create such a shrink-wrapped, centered container, without adding a wrapper element?
I am not sure where the best place to put validation (using the Enterprise Library Validation Block) is? Should it be on the class or on the interface?
Things that may effect it
Validation rules would not be changed in classes which inherit from the interface.
Validation rules would not be changed in classes which inherit from the class.
Inheritance will occur from the class in most cases - I suspect some fringe cases to inherit from the interface (but I would try and avoid it).
The interface main use is for DI which will be done with the Unity block.
The following page has white (left) and dark gray (right) background. I checked the CSS and it has a white background image and color: #FFF. I can't figure out how did he archived that.
How to do that?
http://www.voceantica.com/
(If you enlarge the web browser both colors enlarge themselves too.)
I don't know the exact words to describe this behavior in the following pages: http://kyanmedia.com/ and http://www.jayhollywood.com.au/.
When you hover the pictures (thumbnails). A text shows up smoothly. Is this a jquery plugin or just CSS?
How to reproduce that behavior/effect?
I know that you can create global constants in terms of each other using string concatenation:
define('FOO', 'foo');
define('BAR', FOO.'bar');
echo BAR;
will print 'foobar'.
However, I'm getting an error trying to do the same using class constants.
class foobar {
const foo = 'foo';
const foo2 = self::foo;
const bar = self::foo.'bar';
}
foo2 is defined without issue, but declaring const bar will error out
Parse error: syntax error, unexpected '.', expecting ',' or ';'
I've also tried using functions like sprintf() but it doesn't like the left paren any more than the string concatenator '.'.
So is there any way to create class constants in terms of each other in anything more than a trivial set case like foo2?
My fonts of choice usually default to text figures which is one reason I like them. However, for tables or headings I'd like to specify that lining figures should be used. Is there a way to do so in CSS?
(To appease the search:
old-style numerals, text figures, non-lining figures, medieval numerals
lining numerals, titling figures)
Is it possible to get the memory-allocated address of a newly instantiated class from within that class's constructor during execution of said constructor? I am developing a linked list wherein multiple classes have multiple pointers to like classes. Each time a new class instantiates, it needs to check its parent's list to make sure it is included.
If I try to do something like this:
MyClass() // contructor
{
extern MyClass * pParent;
for ( int i = 0; i < max; i++ )
{
pParent->rels[i] == &MyClass; // error
}
}
I get this error:
error C2275: 'namespace::MyClass' : illegal use of this type as an expression
Any thoughts or suggestions would be appreciated. Thanks.
You can read your browser dimensions with jQuerys $document.height or with simple JS via height: window.innerHeight || document.body.clientHeight.
But how do I apply the value to a CSS class?