Dear All,
In my database I store different vehicles. So each vehicle have different setup of the wheels e.g some 2 infront and 4 at the back some 2 infront and 8 at the back etc. So based on this configuration I would like to programmatically show all the wheels layout. I am planning to use table method is that advisable? Thank you.

Recommended Answers

All 5 Replies

Member Avatar for diafol

Tables are for data, not image display. Images are inline elements anyway, so why not just add a set of axles in the middle of the front and back bits:

FRONT # MiddleSplit @ BACK

Add images to # or @ as required, where FRONT is the front image of a generic vehicle (1 axle), BACK is the back image (1 axle), MiddleSplit is the 'spacer' between front and back. So 2 wheels up front and 8 wheels back (let's say 4 axles):

FRONT | MiddleSplit | Axle | Axle | Axle | BACK

Dear Ardav,
What do you mean by inline element? So are you telling just for the front part e.g I got two wheels so this is how I arrange is it <img src="frontLeftWheel.png><img src"frontAxle.png"><img src="frontRightWheel.png>

Member Avatar for diafol

Images are inline elements, so you shouldn't need a table to display them they should line up one after the other regardless. The only time that they won't is if the page is fluid and you resize the browser screen to less that the total width of the images. However, this can be circumvented by placing them within a fixed width div.

Dear Ardav,
So what is your comment about this sample say front part I got two wheels so this is how I arrange <img src="frontLeftWheel.png><img src"frontAxle.png"><img src="frontRightWheel.png> ? Is that ok or you have other ideas?

Member Avatar for diafol

I have no comment as I don't know how it looks. How about a screenshot?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.