eMoneySpace
Welcome, Guest. Please login or register.
Did you miss your activation email?
News: Earn your money online safely here at eMoneySpace. Jul 03, 2022 09:48 AM




image into a div
Print
Author Topic: image into a div  (Read 2137 times)
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Jun 23, 2012 03:55 AM

Hello..
i was working on coding some new psd of mine.
and i had a little problem there..
i have set the header to be an image but i haven't done it via css but as <img src="img/top.png"/>
now when quests are using chrom, when they hold the image they can drag it away and that sucks.
i do know that if the image is inside a div at the style.css page , it wont be able to drag.
what i mean is :

#top {
background-image:url(img/top.png);
}

then instead of the <img src="img/top.png"/> i will set - <div id="top"></div>

but after i do that the image is gone..
please help me solve this problem.

See the site here - http://gptwebs.com/gpthost
Logged

CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #1: Jun 23, 2012 05:31 AM

Add your DIV to header DIV  and set position of it in css file.
Logged
CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #2: Jun 23, 2012 05:34 AM

Something like this
#header .image{
position:
...
}
« Last Edit: Jun 23, 2012 06:14 AM by CarrioS » Logged
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Reply #3: Jun 23, 2012 06:06 AM

i dont get it.. please explain more..
Logged

CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #4: Jun 23, 2012 06:13 AM

Include your image into header. 
<div class=header>BlaBla
   <div class=image></div>
   </div>

And in your css file too

#header{
Blablablabla
}

#header .image{
Position:..
Url:...
}


Try it, it should work (if you know css).....
Logged
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Reply #5: Jun 23, 2012 07:19 AM

body1 is the "id" of my header.

i have set a class to it as you said, like this:

#body1 .img {
background: url('..');
}

then inthe php page i have added this:
<div id="body1"><center><div class="image"></div></center></div>

but yet its notworking.. what am i doing wrong?
you can see the result in here - http://gptwebs.com/gpthost/

and thanks for the help !!!
Smiley
Logged

CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #6: Jun 23, 2012 07:23 AM

<div class=body1><div class=image></div></div>

Aligment set in your css file
No <center>
Logged
wiicker95
Reputation: (+30)
*

Offline

Gender: Male
Posts: 2122
Referrals: 1


View Profile
Reply #7: Jun 23, 2012 07:29 AM

Hello..
i was working on coding some new psd of mine.
and i had a little problem there..
i have set the header to be an image but i haven't done it via css but as <img src="img/top.png"/>
now when quests are using chrom, when they hold the image they can drag it away and that sucks.
i do know that if the image is inside a div at the style.css page , it wont be able to drag.
what i mean is :

#top {
background-image:url(img/top.png);
}

then instead of the <img src="img/top.png"/> i will set - <div id="top"></div>

but after i do that the image is gone..
please help me solve this problem.

See the site here - http://gptwebs.com/gpthost

You are not supposed to build the website yourself if you cannot do it. Even if you fix the logo, your "site" will still be a huge mess.
Logged
edgeclix

Reputation: (+9)
*

Offline

Posts: 819
Referrals: 0

Mission:- Increaseing My Image!

View Profile
Reply #8: Jun 23, 2012 07:33 AM

You are not supposed to build the website yourself if you cannot do it. Even if you fix the logo, your "site" will still be a huge mess.

Yeah +1 Agree.

First Learn CSS Fully Before Doing This.. We Can Help 1 Time Bot Not Many Times. So Learn Css.

Source:- http://www.w3schools.com/css/default.asp
Logged

CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #9: Jun 23, 2012 07:42 AM

And in your profile is written "Ddesigner"............
Designer, who doesnt know CSS  :-) :-)

Soo.........good luck ;-)
Logged
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Reply #10: Jun 23, 2012 08:12 AM

you guys are crule.
i learn things by doing them.
i learned to design by simply testing and now i am realy good at designing.
This time i am learning to code.
so what if there are things i dont know yet?! that is why i am asking for help in this forum.
and learning from other boring sites is not my style.
if i was good in this i wont ask for help.
Dont be such a snobs.

~~~
and back to the topic:
CarrioS, taking off the <center> tags wont solve the problem.
« Last Edit: Jun 23, 2012 08:15 AM by 2011bux » Logged

CarrioS
Reputation: (+2)
*

Offline

Gender: Male
Posts: 68
Referrals: 1

PHP coder, helper

View Profile WWW
Reply #11: Jun 23, 2012 08:39 AM

<div id=header> --->  <div class=header>
Id is only unique name of tag

And <div class=image align=center></div>
Without <center> tags

And you should have written in your css file informations about header and image
And your index file must contain style from css file.   <style .......   in  <head>....</head>

« Last Edit: Jun 23, 2012 08:43 AM by CarrioS » Logged
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Reply #12: Jun 29, 2012 12:08 AM

i have found the solution !
thank you guys for trying Tongue

html, body, div, span, object,
form, input, h1, h2, button, label, a, img {
  -moz-user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

see here - http://gptwebs.com/gpthost
« Last Edit: Jun 29, 2012 12:12 AM by 2011bux » Logged

CashVertiser

Reputation: (+4)
*

Offline

Gender: Male
Posts: 287
Referrals: 0

Owner/Admin CashVertiser

View Profile WWW
Reply #13: Jun 29, 2012 02:21 AM

you guys are crule.
i learn things by doing them.
i learned to design by simply testing and now i am realy good at designing.
This time i am learning to code.
so what if there are things i dont know yet?! that is why i am asking for help in this forum.
and learning from other boring sites is not my style.
if i was good in this i wont ask for help.
Dont be such a snobs.

~~~
and back to the topic:
CarrioS, taking off the <center> tags wont solve the problem.

+1

Im sure all designers + coders learnt more from other people then reading website/books.


Quote
i have found the solution !
thank you guys for trying

html, body, div, span, object,
form, input, h1, h2, button, label, a, img {
  -moz-user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

see here - http://gptwebs.com/gpthost

Glad you fixed your little problem.
Logged

[Account closed, new account emoneyspinner]
2011bux
Reputation: (+16)
*

Offline

Gender: Male
Posts: 758
Referrals: 7


Design/Host and everything in between!

View Profile WWW
Reply #14: Jun 29, 2012 02:59 AM

Thanks for supporting CashVertiser .
You are awesome!
 dance2
Logged

Print
 
Jump to:  
Copyright © 2008-2022 eMoneySpace. All rights reserved.