Jump to content

Error in my css and w3-css


Recommended Posts

I've messed up, and now I can not find my way back. Can anyone correct my mistakes, please? the text boxes should be set to the right, and they should have a width of 135. I have messed up a bit ..... again.

Please explain the following to me as well:
Is it not the same whether w3-css is inside or outside "class style"? Or is it a difference between regular css inline/.css file and w3 css? It seems to me that this changes according to what minute you are in, because if I set up class and put in regular css there, then it is the same there. Sometimes it works, and other times it doesn't.
I paste in and attach what I have done so you who are specialists can wake up enough to see through what I am doing wrong. I can not find out. It seems like it changes all the time (it does not. Only I have lost the overview. Thank you for helping me 🙂


<header class='w3-container w3-white w3-padding'>
  <div class="div-table-row" 'text-align: right;'>
   <div class="div-table-col" align="left" width="82" height="78" >logo_image</div>
            <div  class="div-table-col">
            <form method='POST' class='w3-padding'>
            <label class style='text-align: right; font-size: 12px;'>E-mail:</label>
            <input type='text' w3-input' 'w3-border'class='w3-container' 'w3-align:right; width:135px;' name='email'>
            <label class style='text-align: right; font-size: 12px;'>Password:</label>
            <input type='password' class='w3-container' style='align: right; width: 135px;' name='password'><id='nav-login' href='<?=$HOST?>login.php' class='w3-bar-item w3-button w3-right' style='font-size: 11px;'><?=$log_btn?></a>
<div id='div-login-table' class='w3-content w3-card-4 w3-light-gray w3-tiny' style= 'align: right;' 'margin-top: 0px; margin-right: 28px; height:172px; width:160px; '>

Link to comment
Share on other sites

Mr. B, I have to go through your answer (what you have marked), and double check it against what I have here/done myself. There is something completely beyond my comprehension here. I've been sitting with this for so long now that I can not bear to set it up again. I lack the understanding of when to use style tag and w3 css / own css file / inline and class alone, or who on what. I have known this so well before, but after 10 years and will start to learn the old again / and remember it at the same time as you get to know what is really new (w3 css). It crashes completely. What you have marked in my script on your image that I have posted I will not find again in the file I have saved on my PC. It's the same, but I do not understand a shit. I will probably come back with follow-up questions and an update.

Link to comment
Share on other sites

Look at the stuff Barand highlighted in yellow. 

Here's the first one: 

 <div class="div-table-row" 'text-align: right;'>

So what is the problem here?  

Well you have a css class you are referencing, which is good.  Then you have an inline style:    'text-align: right;'

Really you should avoid using inline styles, and have your own style sheet you reference in your page, however, if you wanted to do this, the problem is that you are missing the attribute name and equal sign for the inline style definition.


 <div class="div-table-row" style="text-align: right;">


Also try not to mix your quoting style.  For html, best practice is to use double quotes for all attributes.  


The 2nd problem he highlighted is the same as the first.  You have a set of inline styles, but no style=".....".

  • Great Answer 1
Link to comment
Share on other sites

As @gizmola said, the first problem is missing style=

second) You are using obsolete html markup

3) you have specified a couple of classes but not put them inside the class="w3-container"

4) Again inline style without the style=

5) You have broken up the style attributes with a couple of rogue quotes

  • Great Answer 1
Link to comment
Share on other sites

28 minutes ago, LeonLatex said:

Thanks to both of you. As i said, I didn't see this problem/error my self because I have seen me tired and blind on this. As we say in Norway: I didn't see the forest because of all the trees. Thanks...

No worries, this is why the forum exists -- to help people who are working on things, and giving an honest effort, which you clearly are.  Glad you are not giving up.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.