I'was adding a Contact us form in my website but it is not working properly.

I think the problem is in my css External stylesheet.

I've created it in css stylesheet like this:-
/* contact form */


But there is another body element in css stylesheet
/* CSS Document */


  • 0
    What do you mean not working properly?

    Css rules are applied in order of appearance on the same selector. So if you have
    body { somerule: a}
    body {somerule: b}

    The b rule will overwrite the a one.
  • 0
    so what should i do that my both element can perform well.

    where should i insert the property values in css stylesheet. should i make a new body{}
    or should i insert it in existing body{}
  • 0
    @Ashmis new file. For every change. With a new body. Noonononoo

    Just add it to one of the already existing matching selectors.
  • 1
    Maybe it's just me, but modern front ends should rarely be working with css on the body tag anyway. Even more so with scoped css by modern frameworks. Always create a custom class when necessary to avoid affecting other components.
  • 1
    Styles on body are INTENDED to be THE SAME for every page so that shit doesn't look different everywhere!

    If you need something specific, you insert some node in the markup and give it either a class if several of them can be on a page, or an ID if it can occur only once per page, and then you style that selector.
  • 0
    I saw the jQuery tab and gave up hope.
  • 0
    Whichever body tag that loads last from either stylesheet is what will be rendered.
Add Comment