HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Trying to move an image with a link to top left of homepage!
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics
View previous topic :: View next topic  
Author Message
dmorano



Joined: 30 Oct 2008
Posts: 3

PostPosted: Thu Oct 30, 2008 11:56 am     Trying to move an image with a link to top left of homepage! Reply with quote

I am having an issue moving an image to the top left of my homepage. I am new to this and learning as I go. I have google search to the right of the page and I want the 4H link to the left. Any ideas? I have tried to "float" the image but I an obviously doing something wrong. First code is for google search and second is image and link for 4H (This is the one I am trying to move.

Current code:
<DIV class=mainCol>
<DIV id=googleSearch>
<FORM style="DISPLAY: inline" action=http://www.google.com/custom method=get target=google_window><A href="http://www.google.com/"><IMG alt=Google src="http://www.aghost.net/images/google_logo_25wht.gif" align=middle border=0></A> <INPUT class=sb maxLength=255 name=q> <INPUT type=submit value=Search name=sa> <INPUT type=hidden value=pub-3595319624602544 name=client> <INPUT type=hidden value=1 name=forid> <INPUT type=hidden value=ISO-8859-1 name=ie> <INPUT type=hidden value=ISO-8859-1 name=oe> <INPUT type=hidden value=GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1; name=cof> <INPUT type=hidden value=en name=hl>
[u][b[color=red]]<P></P><A href="http://www.mountainviewcoop.com/index.cfm?show=10&mid=11">
[b]<P><IMG src="http://admin.aghost.net/images/E0180401/4h_homepage_banner.jpg" <border=0></P></A></FORM></DIV></DIV>[/b]b][/u]
sticks464



Joined: 31 Dec 2006
Posts: 1284

PostPosted: Thu Oct 30, 2008 1:22 pm     Reply with quote

Give this a try

html
Code:
<div class="mainCol">
<div id="googleSearch">
<form id="google" action=http://www.google.com/custom method=get target=google_window><A href="http://www.google.com/"><img alt=Google src="http://www.aghost.net/images/google_logo_25wht.gif" align=middle border=0></A> <input class=sb maxLength=255 name=q> <input type=submit value=Search name=sa> <input type=hidden value=pub-3595319624602544 name=client> <input type=hidden value=1 name=forid> <input type=hidden value=ISO-8859-1 name=ie> <input type=hidden value=ISO-8859-1 name=oe> <input type=hidden value=GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1; name=cof> <input type=hidden value=en name=hl>
</form>
</div>
<p><a href="http://www.mountainviewcoop.com/index.cfm?show=10&mid=11"><img src="http://admin.aghost.net/images/E0180401/4h_homepage_banner.jpg"></a></p>
</div>


css
Code:
* {/*sets browser defaults to 0*/
margin:0;
padding:0;
}
img {border: none;}/*removes blue border from images*/
a:focus {outline:none;}/*removes dotted border from links*/
.mainCol {
position: relative;
text-align: left;/*for older browsers*/
width: 768px;/*full screen at 800 resolution*/
}
#googleSearch {
position: absolute;
top: 0;
right: 0;
}
#google {display: inline;}
#google input {border: 1px solid #000;}
dmorano



Joined: 30 Oct 2008
Posts: 3

PostPosted: Thu Oct 30, 2008 3:07 pm     It worked... Reply with quote

Sticks464,

Thanks for the help! It worked. Any tips you can give on how you got it to move.

Much appreciated!!!
sticks464



Joined: 31 Dec 2006
Posts: 1284

PostPosted: Thu Oct 30, 2008 6:20 pm     Reply with quote

These were the key elements for the movement
.mainCol {position: relative;

#googleSearch {
position: absolute;
top: 0;
right: 0;


By using classes and id's in css gives more control over elements than using inline styling. Also does away with repetitious styling.
dmorano



Joined: 30 Oct 2008
Posts: 3

PostPosted: Mon Nov 03, 2008 7:03 am     Thanks again.... Reply with quote

Thanks for the help!
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial