Skip to main content

Posts

Showing posts with the label web

Solution to "child margin affects parent" in CSS

The browser implementation is that when the parent has no content and the child requests for margin, the parent is brought down instead of child going down. The solution for these are listed below with their side effects. floats , You  have  to float elements border-top , This pushes the parent at least 1px downwards which should then be adjusted with introducing  -1px  margin to the parent element itself. This can create problems when parent already has  margin-top  in relative units. padding-top , same effect as using  border-top overflow: hidden , Can't be used when parent should display overflowing content, like a drop down menu overflow: auto , Introduces scrollbars for parent element that has (intentionally) overflowing content (like shadows or tool tip's triangle) See the Pen Relative with Margin by Manikanta ( @immnk ) on CodePen .

Implicit objects in JSP page

By default  page, request, session and application  objects are available to JSP pages. So you can access then using EL syntax. And following table shows IMPLICIT objects available to EL. Implicit object Description 1.      pageScope Scoped variables from page scope 2.      requestScope Scoped variables from request scope 3.      sessionScope Scoped variables from session scope 4.      applicationScope Scoped variables from application scope 5.      param Request parameters as strings 6.      paramValues Request parameters as collections of strings 7.      header HTTP request headers as strings 8.      headerValues HTTP request headers as collections of strings 9.      initParam Context - initialization parameters 10. ...