File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem positioning Data using CSS and <s:iterate  ( information is placed on top of each other). Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem positioning Data using CSS and <s:iterate  ( information is placed on top of each other)." Watch "Problem positioning Data using CSS and <s:iterate  ( information is placed on top of each other)." New topic
Author

Problem positioning Data using CSS and <s:iterate ( information is placed on top of each other).

Sammy Bill
Ranch Hand

Joined: Dec 29, 2008
Posts: 96
Hello,

In the following code:



when the data is displayed, It is displayed on top of each other. I understand that it is because i m setting the same CSS dimension for the element.
How can i change the CSS style properties based on the number of iteration so the data will not be displayed on top of each other?

Thanks
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9303
    
  17

Oussama you are using position:absolute here. That's why all the elements are coming on top of each other. Why are you doing it is not clear to me, but a simple solution would be to use position:relative so that the elements are placed in relation to each other at each iteration. That would be the simplest solution...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem positioning Data using CSS and <s:iterate ( information is placed on top of each other).