I have divided my web page in 3 parts
1)topHeader
2)MainContent
3)Footer
and further divided topHeader in two class one is “dropdownmenu” and other is “loginblock” but when I try to shift my loginblock class in the right then my maincontent block content is messing with my topHeader what is wrong with CSS?
You have two divs - one floated left and other floated to the right.
Basically, when you float an element in CSS style, you are pulling that element away from the normal flow layout and thereby making any content below the floating div to move upward. To fix this, you need a block element with CSS style to make any content below it to follow the normal flow layout.
I generally use a div element with property clear:both.
In your case, add a new div element after closing loginblock div.
That’s an old / obsolete way of doing things, Steve. I recommend you read my article for more up-to-date methods which require no additional HTML markup.