Jump to content


Photo

Background image no repeat


  • Please log in to reply
5 replies to this topic

#1 phpgoal

phpgoal

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts

Posted 02 August 2013 - 10:08 AM

Hello,

 

I want to have the sky image take the 100% width. It does take 100% width but picture is repeating. How can I have the image without repeating?

 

 

<table background="sky.JPG" width ="100%"  >
<tr><td> 
test
</td></tr>
</table>


#2 Pawan_Agarwal

Pawan_Agarwal

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts
  • LocationIndia

Posted 02 August 2013 - 10:38 AM

give some css to your html code



#3 phpgoal

phpgoal

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts

Posted 02 August 2013 - 10:53 AM

This is working.

#header-wrapper img{   top: 0;   left: 
0;   height: 307px;   width: 100%;}
 
<div id="header-wrapper" ><img src="sky.JPG"/>
</div>

I want to set the sky image in background instead so that i can have other links on the top of the background. Could you please help?



#4 Pawan_Agarwal

Pawan_Agarwal

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts
  • LocationIndia

Posted 02 August 2013 - 12:35 PM

you can put the links and then the <DIV> like this

 

<a></a>      <a></a>      <a></a>      <a></a>      <a></a>      

 

<DIV>image background</DIV>



#5 cyberRobot

cyberRobot

    Advanced Member

  • Gurus
  • 1,413 posts

Posted 29 August 2013 - 06:52 AM

Instead of using an <img> tag, have you tried using the background-image property:

https://developer.mo...ackground-image

 

Note that you could also utilize the background property:

https://developer.mo.../CSS/background


Blogging about PHP and other web development topics at ScorpBytes.com

#6 madhuvishwakarma

madhuvishwakarma

    Member

  • Members
  • PipPip
  • 17 posts

Posted 12 September 2013 - 05:36 AM

hi...

This would help you for sure.

 

 

<style type="text/css">

body {
    background-repeat: no-repeat;
    }
</style






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com