Jump to content

divs


Mr-Antony

Recommended Posts

hi i am learnin how to do div instead of using tablesbut i need a bit of help?the thing i am wantin to know is how do i put lets say 2 imgaes on the same line and how to space them from each othersorry for been a noobthxmr-antony

Link to comment
Share on other sites

You put images next to each other on one line by placing them next to each other (not necessarily on one line) in the source code. That is

<div><img src="1.jpg" alt="1" /><img src="2.jpg" alt="2" /></div>

and you space them from each other by adding margins or paddings to them in CSS. If you haven't already read the CSS turoail, you'll have to, as there's no way to accomplish anything visually without it. At least, not "strict"-ly speaking.

Link to comment
Share on other sites

thank you very much is there any good sites i can get some more info on about divs thx
I am new to the site building business my self, but I can offer some advice:-Go with CSS and what "boen robot" said to ensure compatability with XHTML now and in the future. Tags become depricated and while they still work it is surely worth future compatability to try to comply with XHTML Strict. -As far as info on "div" goes, an in depth book on XHTML would be more useful than any free sight, this sight "W3Schools" is about as good as they come.
Link to comment
Share on other sites

That non-breaking space does work, but adding margins or padding will work better. You wiil have more control and it can be changed simply be editting the css file. Perhaps adding a 'class' for those images would be better still...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...