Jump to content

vmars316

Members
  • Posts

    480
  • Joined

  • Last visited

Posts posted by vmars316

  1. This code is closer to

    But as soon as i add another section

    I want to modify it so it looks like this:

    <header >

    <nav><section>

    <section >

    <footer >

    It shows shows as

    <header >

    <nav><section><section>

    <footer >

    Pls , how can I fix this ?

    <!DOCTYPE html><html><head><style>header {    background-color:black;    color:white;    text-align:center;    padding:5px; }nav {    line-height:30px;    background-color:#eeeeee;    height:300px;    width:100px;    float:left;    padding:5px; }section {    width:350px;    float:left;    padding:10px; }footer {    background-color:black;    color:white;    clear:both;    text-align:center;    padding:5px; }</style></head><body><header><h1>City Gallery</h1></header><nav>       <ul>            <li><a href="#">Home</a></li>            <li><a href="#">About Us</a></li>            <li><a href="#">Contact Us</a></li>        </ul>London<br>Paris<br>Tokyo<br></nav><section><h1>London</h1><p>London is the capital city of England. It is the most populous city in the United Kingdom,with a metropolitan area of over 13 million inhabitants.</p><p>Standing on the River Thames, London has been a major settlement for two millennia,its history going back to its founding by the Romans, who named it Londinium.</p></section><footer>Copyright © W3Schools.com</footer></body>

    Thanks..vm

     

     

     

  2. Hello & Thanks ,

    Still learning via dsonesk 's example code .

     

    I want to modify it so it looks like this:

    <header >

    <nav><section>

    <section >

    <footer >

     

    So partial code looks like this (full code follows);

    <header><h1>City Gallery</h1></header><section><nav>       <ul>            <li><a href="#">Home</a></li>            <li><a href="#">About Us</a></li>            <li><a href="#">Contact Us</a></li>        </ul></nav><section><h2>sub title</h2><div class="two_col"><h3>sub title</h3><p>...</p></div><div class="two_col"><h3>sub title</h3><p>...</p></div></section></section><section><h2>sub title</h2><div class="two_col"><h3>sub title</h3><p>...</p></div><div class="two_col"><h3>sub title</h3><p>...</p></div></section><footer>

    Full code here :

    <!DOCTYPE html><html><head><style>body, html {margin:0; padding: 0}body {background-color: yellow;}#wrapper {width: 80%; max-width: 1280px; margin: 0 auto; }header {    background-color:black;    color:white;    text-align:center;    padding:5px;	 }nav {    line-height:30px;    background-color:#eeeeee;    height:300px;<!--     width:100px;  -->    width:25%    float:left;    padding:5px; }section {        background-color:#eeeeee;          overflow: hidden;          padding:10px;<!--		  float:left; -->}footer {    background-color:black;    color:white;    clear:both;    text-align:center;    padding:5px;	 	 }.two_col {width: 50%; float: left; background-color: lime; }.two_col + .two_col {background-color: blue;}.two_col > * {padding: 10px; }</style></head><body><div id="wrapper"><header><h1>City Gallery</h1></header><section><nav>       <ul>            <li><a href="#">Home</a></li>            <li><a href="#">About Us</a></li>            <li><a href="#">Contact Us</a></li>        </ul></nav><section><h2>sub title</h2><div class="two_col"><h3>sub title</h3><p>...</p></div><div class="two_col"><h3>sub title</h3><p>...</p></div></section></section><section><h2>sub title</h2><div class="two_col"><h3>sub title</h3><p>...</p></div><div class="two_col"><h3>sub title</h3><p>...</p></div></section><footer>Copyright © W3Schools.com</footer></div></body></html>

    Can I do this with just the header, nav, section, footer (& maybe aside) elements .

    Or do I have to use something like .section1 , section2

     

    Thanks..vm

  3. Hi dsonesuk ,

     

    I have spent the entire day scouring the internet trying to figure out what all this means .

     

    .two_col {width: 50%; float: left; background-color: lime; }.two_col + .two_col {background-color: blue;}.two_col > * {padding: 10px; }

     

    I see the results of course , but don't understand what applies to what .

    And I am quite surprised that <div and <p don't cause a line break , or <br> or some such .

     

    Can you explain all that to me , or aim me at a w3schools example .

     

    Thanks...vm

  4.  

    Tables should only be used to show data in tabular layout, so div would be better option, but with html5 you have new header, aside, footer, section elements which would be better option than the div elements if these are used for these specific areas.

     

    The most modern practice for layout is to use float, width, margin and padding to lay things out on the page. Be sure to use the appropriate elements for the context, such as <section>, <article>, <p>, <figure> and so on.

    Ok , it seems that you are both aiming me at html5 . Is this correct ?

    With the code below , I get pretty much what I want .

    <!DOCTYPE html><html><head><style>table, th, td {    border: 1px solid black;}</style></head><body><table style="width:100%">  <tr>    <th>Welcome to myFavs Bookmark Manager !</th>       </tr></table><table style="width:100%">  <tr>    <td width="40%">myFavs.png</td>    <td width="60%">The width attribute is not supported in HTML5. Use CSS instead. </td>  </tr></table><table style="width:100%">  <tr>    <td width="10%">Home<br>About<br>Links</td>    <td width="90%">The width attribute is not supported in HTML5. Use CSS instead.</td>  </tr></table><table style="width:100%">  <tr>    <td width="100%">The width attribute is not supported in HTML5. Use CSS instead.</td>  </tr></table><p>The width attribute is not supported in HTML5. Use CSS instead.</p></body></html>

    But will my above code be obsolete someday ?

    And could it be frowned upon by Google or others ?

    Likewise for html5 . ?

     

    Also , can html,css,html5,javascript,dhtml,xhtml

    all be used in the same webpage ?

     

    Thanks...Vern

  5. Hello & Thanks ,

    Need some help on how to layout my html page .

    Html/table vs div vs html5/table vs css/table .

     

    Basically , I want Page to look like .

     

    Table:

    [ Cell ]

    [ Cell ] [ Cell ]

    [Cell] [ Cell ]

    [ Cell ]

     

    I'd rather not use Headers H1............H6 .

     

    Of 'Tables html/div/html5/css' which is most compatible for all browsers ,

    And which may have the most longivity , as far as standards go ?

    I would like to be able to pick one (html/div/html5/css) and stick with it down the road .

     

    Thanks...Vern

     

  6. Hello & Thanks ,

    I created a freeware program (myFavs) that creates an html page

    (myFavs.html)

    which has a bunch of dropDown menus .

    Each menu has a list of websites to click on .

    It works fine , except that when I click/select a link

    it reuses the same Tab as the myFavs.html I did the clicking on .

     

    But what I want to do , is to open up a new Tab for the clicked-on link .

    I believe all I need to do is to change the <select onchange= value .

    <select style="width:200px; font:14px Arial Black; color:rgb(0,0,0); background-color:rgb(231,169,126);" name="menu" onchange="window.open(this.options[this.selectedIndex].value,'_top')">  

    The part I need to change is this:

    onchange="window.open(this.options[this.selectedIndex].value,'_top')"

    To leave the myFavs.html open , AND open a New Window for the link clicked-on ,

    what should that 'onchange=' be changed into ?

     

    Here is what the BuiltPage looks like:

    http://www.vmars316.com/ShowMe/MyIndex.html

     

    Thanks...Vern

    .

     

  7. Hello & Thanks ,

    I would like to convert .html to .rtf and/or .txt format .

    I found the following code @

    stackoverflow.com/questions/150208/how-do-i-convert-html-to-rtf-rich-text-in-net-without-paying-for-a-component

    that converts html to rtf .

    I would like to insert code below , into an html page .

    Pls , what would the html/javascript (that wraps code) look like ?

    Using reportWebBrowser As New WebBrowser        reportWebBrowser.CreateControl()        reportWebBrowser.DocumentText = sbHTMLDoc.ToString        While reportWebBrowser.DocumentText <> sbHTMLDoc.ToString            Application.DoEvents()        End While        reportWebBrowser.Document.ExecCommand("SelectAll", False, Nothing)        reportWebBrowser.Document.ExecCommand("Copy", False, Nothing)        Using reportRichTextBox As New RichTextBox            reportRichTextBox.Paste()            reportRichTextBox.SaveFile(DocumentFileName)        End Using    End Using

    Thanks...Vern

  8. Thanks ,

    The following line of PB (pure basic) that creates the proper html-code is this:

    LTTD01$ = "<TR><TD style="+#DQ$+"height:50px; background-color:#"+TBox02dot$+";"+#DQ$+">"+OneLine$+"</TD>"

    The code that Chrome (etc.) sees is this:

    <TR><TD style="height:50px; background-color:#E6E9FE;">0,0,E6E9FE</TD>

    I am happy with this.

     

    I don't understand what you mean by "escape-code".

    Thanks..vm

  9. Hello & Thanks ,

    Turns out I needed to create a DoubleQuote constant (#DQ$ = chr(34)) and then all went well .

    Here is the winning line:

    LTTD01$ = "<TR><TD style="+#DQ$+"height:50px; background-color:#"+TBox02dot$+";"+#DQ$+">"+OneLine$+"</TD>"
    If anyone is interested, I am happy to Post the PureBasic code, 111 Lines.
    Thanks All !..vm
  10. Thanks,

    I generate the code from a program .

    Here is a sample of the code .

    I can't hand the program any imbedded "

    so I am using " instead .

     

    Any suggestions ?

    Thanks..vm

     

    Procedure FileOut(OneLine$)   ; Input file  looks like this:          ; 41,1,E0FCE9        ; 42,1,E0FAE8        ;TBox02.s = "E0FCE9"   ; Output file looks like this        ;OneLine$ = TableRow     If FileOpen = 0   ;     MessageRequester("FileOpen = 0", "ColorTable.html")           If CreateFile(2, "ColorTable.html")           FileOpen = 1          WriteStringN(2,"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">")          WriteStringN(2,"<html><head>")          WriteStringN(2,"<meta charset="utf-8"><title>xRainbow-Project</title>")          WriteStringN(2,"<style>")          WriteStringN(2,"table td {border: 1px solid black; color: Black;}</style>")          WriteStringN(2,"</head><body>")             WriteStringN(2,TableBeg$)      Else                MessageRequester("PureBasic", "Error: can't Create file", 0)         End        EndIf  ; CreateFile(2,            EndIf  ; FileOpen = 0  
  11. Hello & Thanks ,

    Need help, I can't figure out what's wrong with this code:

     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
    <html><head>
    <meta charset="utf-8"><title>xRainbow-Project</title>
    <style>
    table td {border: 1px solid black; color: Black;}</style>
    </head><body>
    <TABLE>
    <TR><TD style= "height: 50px; background-color: #E6E9FE &quote;>0,0,E6E9FE
    <TR><TD style= "height: 50px; background-color: #E7EAFF &quote;>1,0,E7EAFF
    </Table>
    </body>
    </html>
    Thanks..vm

     

  12. Ya, I even changed it to :

     

    <script type="text/javascript">
    function myFunction() {
    var i = 0;
    while (i < 3) {
    alert("alert box #1");
    alert("alert box #2");
    i++;
    }
    }
    </script>
    And it still doesn't work.
    I'll try a reboot.
×
×
  • Create New...