CrazyEngineers
  • Tried a CSS Frame Generator

    Updated: Oct 25, 2024
    Views: 1.1K
    Being a Web Developer, particularly a Front End Engineer, we try planning the layout first, using the HTML Tags and stuff, and then think of building the CSS. The first thing we do is, take a paper and draw the layout. And this is how it looks:
    [​IMG]

    After thinking about how the layout is, we need to write the HTML Code, which is also kind of easy task, but needs some good thinking and stuff. That would give an output in the form of HTML, yeah, includes the paper-work too! Ha ha! The output would be something similar to what is below:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <title>My New App</title>
        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div class="wrap">
            <div id="header">
                <h1 id="logo">[url=#]My New App[/url]</h1>
            </div>
            <div id="sidebar">
                <ul>
                    [*][url=#]Link 1[/url]
                    [*][url=#]Link 2[/url]
                    [*][url=#]Link 3[/url]
                    [*][url=#]Link 4[/url]
                    [*][url=#]Link 5[/url]
                </ul>
            </div>
            <div id="content">
                <!-- Content Goes Here -->
            </div>
        </div>
    </body>
    </html>
    After this part is done, the main task of building CSS comes in! We need to find the CSS and for each element in the DOM, the output we need would be:
    body {}
    body div.wrap {}
    body div.wrap div#header {}
    body div.wrap div#header h1#logo {}
    body div.wrap div#header h1#logo a {}
    body div.wrap div#sidebar {}
    body div.wrap div#sidebar ul {}
    body div.wrap div#sidebar ul li {}
    body div.wrap div#sidebar ul li a {}
    body div.wrap div#content {}
    But this process is really tedious when the page is too big. So we thought of using an app, which does this same work. I personally preferred #-Link-Snipped-#. Another problem comes in. It is a hosted app and when we are offline or we need to use it for private purposes, we couldn't rely on it.

    So, I thought of building a same one using PHP. Now guys here, try to think of what I could have done, or at least what techniques I would have used. 😀

    More to come!!! 😀
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Sahithi Pallavi

    MemberJul 16, 2012

    Fine. Keep helping us with more good tutorials 👍
    Are you sure? This action cannot be undone.
    Cancel
  • anjkalai

    MemberJul 20, 2012

    hi mr.praveen! its nice read ur explaination and i got it too! but what is this: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "#-Link-Snipped-#">
    <html xmlns="#-Link-Snipped-#" xml:lang="en">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />"😕

    can u plz explain?
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJul 20, 2012

    #-Link-Snipped-#, It is called DTD or Document Type Definition! It is used for identifying which HTML version you are using. The next line is the starting HTML tag. It has a XML NameSpace attribute for which type of XHTML it uses, and the language!

    The META tag is a metadata of the HTML file, which says about the Content-Type, which is a HTML Page with a MIME Type of text/html, and the character set used in it is UTF-8.

    Hope this is clear! 😀 Let me know if you want further clarifications! 😀
    Are you sure? This action cannot be undone.
    Cancel
  • anjkalai

    MemberJul 21, 2012

    thanks a lot! mr.praveen, i got it!
    Are you sure? This action cannot be undone.
    Cancel
  • deepu11111111

    MemberJul 25, 2012

    It's Nice Thank you....
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register