They drive me crazy!



Can anyone tell how i can make the div "commentFormRightWrapper" inline with the div "commentFormLeftWrapper"? I already tried, float and display attributes.

The website looks like this right now:


giving both classes a property + value display: inline-block; should do the trick, but this of course depends of the rest of your css code

If you need more help, please copy your full html and css code to the forum, so we can actually experiment with it


I have nothing in my css. I tried to put what you suggested into my .css file, but it still didnt work. But i didnt understand what you ment by "giving both classes a property"?


you don't have a css file? Could you copy your full html code to the forum so i can run it?


this is not working, first off, you forgot a equal sign after class here:

<div class "commentFormLeftWrapper">

and i wouldn't solve the problem the way you did. I would do something like this:

<div class = "commentFormLabel">First name:input class = "commentFormInput" type = "text"><label>Error:</label></div>

otherwise, it is danm well nearly impossible to get them lined up. Even better would be the use of a table, that would look much cleaner.

But you can use div, just put the label, input and error label inside one div. This way, they will perfectly on one line.

One more thing: Please don't use this in anything you are actually deploying. For the rest, keep practicing :slight_smile: Hold on, that is not fair of me. If you are actually submitting a form which is important, make sure to add server side validation.


Hey thx for helping me out, seems like the first code where i missed an equal signed solved the problem. :slight_smile:


i would still recommend tables to make it look good :slight_smile:


Look good in the code or visually on the website? :slight_smile:


visually appealing on the website. It gives you the option to perfectly align all the labels with the input fields.