Tag: dyssahagun.com

  • CSS Kids, It’s Time to Grow Up

    Bloat the stylesheet and not the HTML markup.

    Everybody agree?

    The big baby way of styling:

    HTML:
    [code lang=”html”]
    <p class="big">Tell me now, is it so<br>
    Don’t let me be the last to know<br>
    My hands are shaking<br>
    <span class="red">Don’t let my heart be breaking</span></p>
    [/code]

    CSS:
    [code lang=”css”]
    .big {font-size:2em;}
    .bigger {font-size:3em;}
    .red {color:red;}
    .green {color:green;}
    [/code]

    Isn’t that pretty? If you want to make the paragraph’s font size bigger, you only need to change its class to “bigger” and the red line could be green in no time.

    But no. Like the title said, grow up CSS kids. CSS spoonfeeding stops here.

    The big boy way:

    HTML:
    [code lang=”html”]
    <p class="lyrics">Tell me now, is it so<br>
    Don’t let me be the last to know<br>
    My hands are shaking<br>
    <span class="ouchy">Don’t let my heart be breaking</span></p>
    [/code]

    CSS:
    [code lang=”css”]
    .lyrics {font-size:2em;}
    .ouchy {color:red;}
    [/code]

    When you’re working on HTML markups, set aside the stylesheet. All you have to do is name your HTML tags for what they are and not for what you want them to appear.

    Like in the example above, that paragraph contains lyrics and not some random big texts so name it “lyrics”.

    Think about this: if the developers kidnap your HTML file and all you have is the stylesheet, it would look stupid to have a “red” class name but appears to be in a different color (if the client tells you to make it green).

  • PC, XAMMP – Wifi – iPad: Website Testing

    In case that you need to test your website in your mobile device, just connect to your PC IP address (given that you’re using XAMMP).

    Here are the steps:

    1. Run XAMMP
    2. Know your PC’s IP address by running “cmd” and typing “ipconfig”
    3. Type that IP address into your iPad’s browser
    4. If XAMMP talks about its “new security concept” then you have to edit this file from the XAMMP folder: httpd-xampp.conf
      • Go to: xampp\apache\conf\extra
      • Open “httpd-xampp.conf” in a text editor
      • Look for this line “Allow from ::1 127.0.0.0/8” and below it, add “Allow from all”
      • Restart XAMMP
    5. Done!
  • Same Height Divs

    So how really do you get the height of the longer div and apply it to another so that they would have equal height?

    Simple. By JS! I’m not in a master-level when it comes to jQuery or JavaScript; I still run to Stack Overflow and jQuery documentation to get a general knowledge of which does what.

    Assuming you’re using jQuery in your little web page, follow me on this short walkthrough:

    [code lang=”js”]
    $(document).ready(function() {

    var $longerDiv = $(‘#long-div’).height();

    $(‘#short-div’).css(‘min-height’, $longerDiv+"px");

    });
    [/code]

    This line creates a variable named “$longerDiv” and it gets the pixel height of the #long-div element in your HTML mark-up.
    [code lang=”js”]var $longerDiv = $(‘#long-div’).height();[/code]

    And this one applies that number (without the “px”) into the css property, “min-height” and we add “px”.
    [code lang=”js”]$(‘#short-div’).css(‘min-height’, $longerDiv+"px");[/code]

    Check out the demo on jsFiddle: http://jsfiddle.net/8WDWf/

    There might be a better way in doing this — hit up the comments!

    Other code-testing sites on CSS-Tricks: http://css-tricks.com/seriously-just-make-a-jsfiddle/

  • Site-Building: Day Five

    It is the fifth day I’ve come back with my toolbox to continue building again.

    Today, we’re going to look at how typography and link color/behavior could greatly affect the look of a site.

    I’m planning to customize the link color and remove the default underline and also experiment on the webfont (maybe use Open Sans?).

    Site-Building: Day Five
    A bit fleshy. Not quite sure.
  • Splash’s not dead!

    But who ever said it is? Splash pages/screens in web and apps are useful while the homepage/screen is loading. One could also use an animation when exiting from the splash.

    So be creative on those splash now.

  • Windows Search: XP – 1; 7 – 0

    win7-win-xp
    Windows XP has Benny the dog while Windows 7 has none.

     

    Due to clumsiness, I lost a Photoshop file I was working on last Friday. It was an Android “mock-app” and prior to working on it, it was supposed to be a template file so the file name was something like “android-app_template_1a.psd.

    Now, it’s Monday and it’s back to work, I was looking for the file with the project file name in mind. So, tough luck for me finding it.

    I know, I could have looked up files modified by Friday but Windows 7 Search thinks you could just describe what you’re searching for in the Search field.

    Windows Search: XP - 1; 7 - 0
    Thought so…

    I never had this “difficulty’ in Windows XP. Makes me miss Benny the dog whom we shooed away far too many times. *sniff*

    Windows Search: XP - 1; 7 - 0
    Hi, my name is not Benny and I’m never coming back.

    Since we can’t do anything about it, might as well memorize operators, keywords, and wildcards for Windows 7 Search.

  • The Noun Project

    I recently joined The Noun Project — a site that crowdsources icons from designers and uploaders.

    From their About page:

    The Noun Project is a platform empowering the community to build a global visual language that everyone can understand.

    Visit my page; I’m working on a facial expression series: Dys on The Noun Project

    The Noun Project

  • Site-Building: Day Four

    All WordPress .assistive-text and .screen-reader-text are being hidden superficially — screen readers would still be able to read them.

    Here’s the CSS snippet from HTML5 Boilerplate v4.0:

    .visuallyhidden {
    	border:0;
    	clip:rect(0 0 0 0);
    	height:1px;
    	margin:-1px;
    	overflow:hidden;
    	padding:0;
    	position:absolute;
    	width:1px;
    }
    Site-Building:Day 4
    A screenshot of the 4th day of our Site-Building series.

     

    By the way, I would write a separate post here how I write the class or ID name of an HTML element rather than placing the pre-defined class selector in the HTML code. For example, instead of putting .visuallyhidden in all elements that I want to be displayed according to the style, I would put its class or ID name along with .visuallyhidden in the stylesheet.

  • Rebels at Work

    My Rebels at Work answered questionnaire.

    About Rebels at Work:

    This Rebels at Work community is for corporate rebels to share experiences, insights and advice with other rebels and aspiring rebels. By rebels we’re talking about those people who feel compelled to create ways to improve, change, and innovate. They are brave (or foolhardy) enough to stand against the prevailing mindset of the organization and argue for a better way. The hope is that rebels can find courage and ideas to be more successful, and executives can see why their success depends on encouraging rebels.

    You may share your story, too, if you’re a “rebel”.

    Rebels at Work
    A screenshot of my page at Rebels at Work.
  • Site-building: Day Three

    Day Three

    And here’s day three of our site-building series.

    Not sure if this would work — 25% for the left sidebar and 75% for the main content.

    I’m also testing an alternate position of the sidebar so that the main content would be the focus on the right side.