Difference between revisions of "Picture and element positioning"
Jump to navigation
Jump to search
old>Admin |
m (12 revisions imported) |
||
(10 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Sometimes you will want to merge form elements with an illustration: | |||
[[File:GaneDiagram.PNG]] | |||
== How to do it == | |||
# Upload a picture to Media files and copy the URL | # Upload a picture to Media files and copy the URL | ||
# Add a Static content element and insert picture reference | # Add a Static content element and insert picture reference | ||
#: '''<img src=COPIED_URL>''' | |||
# Add other fields and merge the with the picture field (above) | # Add other fields and merge the with the picture field (above) | ||
# Create a stylesheet extension and link to the solution | # Create a stylesheet extension and link to the solution | ||
#* The outer element of the picture should have the following CSS | #* The outer element of the picture should have the following CSS element | ||
#: '''position: relative;''' | |||
#* The picture and fields inside should have the following CSS elements | |||
#: '''position: absolute;''' | |||
#: '''top: '''[OFFSET]'''px;''' | |||
#: '''left: '''[OFFSET]'''px;''' | |||
== Sample CSS == | |||
position: relative; | .PAGE_28013 td { | ||
position: relative; | |||
} | |||
# | #VB_PICTURE { | ||
position: absolute; //relative to outer element | |||
left: 0px; //Upper left corner | |||
top: 0px; | |||
} | |||
# | #NB_INPUTBOX1 { //Label | ||
position: absolute; //relative to outer element | position: absolute; //relative to outer element | ||
left: 10px; | left: 10px; | ||
top: 10px; //Above input box | top: 10px; //Above input box | ||
} | } | ||
# | #VB_INPUTBOX1 { //Input | ||
position: absolute; //relative to outer element | position: absolute; //relative to outer element | ||
left: 10px; | left: 10px; | ||
top: 10px; //Below descriptive label | top: 10px; //Below descriptive label | ||
} | } |
Latest revision as of 11:55, 10 December 2021
Sometimes you will want to merge form elements with an illustration:
How to do it
- Upload a picture to Media files and copy the URL
- Add a Static content element and insert picture reference
- <img src=COPIED_URL>
- Add other fields and merge the with the picture field (above)
- Create a stylesheet extension and link to the solution
- The outer element of the picture should have the following CSS element
- position: relative;
- The picture and fields inside should have the following CSS elements
- position: absolute;
- top: [OFFSET]px;
- left: [OFFSET]px;
Sample CSS
.PAGE_28013 td { position: relative; }
#VB_PICTURE { position: absolute; //relative to outer element left: 0px; //Upper left corner top: 0px; }
#NB_INPUTBOX1 { //Label position: absolute; //relative to outer element left: 10px; top: 10px; //Above input box } #VB_INPUTBOX1 { //Input position: absolute; //relative to outer element left: 10px; top: 10px; //Below descriptive label }