Log In · Register

 
I forgot a code
GunsNRachel
post Feb 28 2009, 11:58 AM
Post #1


Senior Member
****

Group: Member
Posts: 292
Joined: Jul 2007
Member No: 545,047



I know I've used it before but I'm blanking. I have a very wide image, which I want to use for the header of a layout. I made it so large, so that people with bigger resolutions can see more. I don't know how to explain this too well..

I want the image to only show what can fit on the screen. I don't want a scroll bar that show shows the whole image. How do I do this?

Also, I don't want this image to be the background. I want to have it on a div.
 
 
Start new topic
Replies
GunsNRachel
post Feb 28 2009, 12:38 PM
Post #2


Senior Member
****

Group: Member
Posts: 292
Joined: Jul 2007
Member No: 545,047



CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
body {
background:url("http://i636.photobucket.com/albums/uu84/RachelPlafchan/hellyeabg.png");
background-repeat: repeat;
background-attachment: scroll;
font-size: 14px;
color: black;
text-align: center;
font-family: arial;
}

#header {
position: absolute;
width: 1800px;
left: 50%;
margin-left: -900px;
overflow: hidden;
top: 0px;
}



</head>
</style>
<body>
<div id="header">
<img src="http://i636.photobucket.com/albums/uu84/RachelPlafchan/finally2.png" />
</div>
</body>
</html>


That's my code. Only problem is that there's a scroll bar that lets you go to the right, but not the left. I don't want a scroll bar at all. Help?
Reason for edit: Please use [codebox] tags instead of [code] tags when posting longer codes. - Mike
 

Posts in this topic
GunsNRachel   I forgot a code   Feb 28 2009, 11:58 AM
jcp   So do you want to keep it center and just remove t...   Feb 28 2009, 12:05 PM
GunsNRachel   I just wanted to get rid of the scroll bars. than...   Feb 28 2009, 12:16 PM
Mike   Try this: CODE<style> .header {position...   Feb 28 2009, 12:27 PM
GunsNRachel   CODE<!DOCTYPE html PUBLIC "-//W3C//DTD...   Feb 28 2009, 12:38 PM
Mike   Replace this: CODEbody { background:url(...   Feb 28 2009, 12:41 PM
GunsNRachel   Thank you so much!   Feb 28 2009, 12:48 PM
GunsNRachel   Actually I have another problem now. I want it to ...   Feb 28 2009, 12:51 PM
Mikeplyts   Try using this to make it scroll but no horizontal...   Feb 28 2009, 01:08 PM
GunsNRachel   Doesn't work =\   Feb 28 2009, 01:44 PM
Mike   It's actually like this: CODEoverflow-x:h...   Feb 28 2009, 02:05 PM
Mikeplyts   ^Oh yeah. haha.   Feb 28 2009, 02:14 PM
GunsNRachel   I love you guys! Thanks a ton =)   Feb 28 2009, 02:21 PM
Mike   Topic closed & moved.   Feb 28 2009, 02:46 PM


Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: