Click to See Complete Forum and Search --> : aligning pictures
dougiejdm
09-13-2005, 09:01 PM
i'm fairly new to this so excuse the simple question...
i have a drop down menu on the top left of my screen, and i have a picture in the center. i want the picture to be at the top equal to the menu. but it always aligns itself below and to the center of the menu. how can i tell it to go to the top.
here is the site so you can see what i'm talking about.
www.josiebug.ca
thanks
tabzter
09-13-2005, 09:49 PM
you should really be using CSS but another way round this is to use a <table>
make a cell for the dropdown menu on the left for the image on the right-side
Luke2000
09-14-2005, 10:22 PM
Something like this might work for what you want:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<html>
<title>Your Site Name Here</title>
<frameset rows="50%,50%">
<frameset cols="30%,40%,30%">
<frame src="yourlinks.htm" name="mylinks">
<frame src="yourpic.htm" name="mypic">
<frame src="a_blank.htm" name="a_blank">
</frameset>
<frame src="a_blank.htm" name="a_blank">
</frameset>
</html>
Hi -
A <div> is a block-level element, which means that it'll normally be placed one below the first - not side by side - unless you've set specific widths for both that fit in their parent element and float them both to the left or right. [Then have an element that'll clear:both;]
Or use a new tag like <div id="contain">, and set the image as a background for it - and your menu <div> just would need a margin on the top to clear the height of the img.
Good luck,
El
Zipped and ready to run.
The (resized) image is now a background image and the text is position:absolute to align it below the image.
dougiejdm
09-15-2005, 05:20 PM
thanks for the help...the background image doesn'twork cause it's enormous. i don't want it as a background, i just want it parallel with the drop down box.
what is css? like i said, i'm learning...
If you use the zipped files you would see the image has been reduced, as it should have been. The image as a background will be correctly aligned.
CSS tutorial (http://www.w3schools.com/css/default.asp)
dougiejdm
09-15-2005, 05:32 PM
i used the zip file...check my page out now with the zipped file...
It's still the original one.
dougiejdm
09-15-2005, 06:06 PM
ok so i floated it right and now it looks like this. www.josiebug.ca
is there anyway to float in center? when i typed center it just went to the left of the screen...
ray326
09-15-2005, 11:59 PM
Instead of "float:right" try "margin: 0 auto" and please fix your HTML and don't dumbnail the image. In fact if you just made the image the right size you could put it in the body background and all would be right with the world.