Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
style sheet background only showing up on one line
Old 08-26-2008, 07:00 PM style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
hi, In Dreamweaver , when i right click my html document in design mode and choose "css styles" -> "mystyle", it is supposed to show up a repeated background, but the background only shows up on one line. this is the same when i choose a background color, when i right click the page and choose mystyle, it only colors one line. any help greatly appreciated. thanks. derek

Last edited by silverglade; 08-26-2008 at 07:16 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-26-2008, 08:13 PM Re: style sheet background only showing up on one line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Lets see the code, it's impossible to know what's going on w/o it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:16 PM Re: style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
here is the code for the style sheet.

Code:
@charset "utf-8";
.testingdog {
    background-image: url(worlds-strongest-dog.jpg);
    background-repeat: repeat;
}
and here is the code for the html page.

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=utf-8" />
<title>Untitled Document</title>
<link href="file:///C|/wamp/www/code/testingdog.css" rel="stylesheet" type="text/css" />
</head>

<body>
<p class="testingdog">&nbsp;</p>
</body>
</html>
silverglade is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:22 PM Re: style sheet background only showing up on one line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
So, you're putting the repeating background on a BLANK paragraph ? How do you expect to see more than 1 line when there's nothing there ? When you put the background on a paragraph, it's only going to be as high as the text within it, so DW is showing you exactly what you gave it.

Oh, and you don't need the background-repeat: repeat - repeat is the default behavior.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:25 PM Re: style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
thank you. do you know what i have to do to make the dog image repeat all over the page ? when i right click the page and insert the css, it only shows up on one line when i thought it would show up on the whole page it seems to do that automatically.
silverglade is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:27 PM Re: style sheet background only showing up on one line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
If you want an image to be the background for the entire page, apply the background to the body in your css:

body{background: url(worlds-strongest-dog.jpg);}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:41 PM Re: style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
i tried pasting the body code in my css because by default dreamweaver doesnt give me a body tag in my css. but here is my second try and it still only outputs on one line.

code for the css.
Code:
 @charset "utf-8";
}
.dogrepeat3 {
    background-image: url(worlds-strongest-dog.jpg);     
}
code for the html page when i right click and insert the css.

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=utf-8" />
<title>Untitled Document</title>
<link href="file:///C|/wamp/www/code/newdogrepeat.css" rel="stylesheet" type="text/css" />
</head>

<body>
<p class="dogrepeat3">&nbsp;</p>
</body>
</html>
the background image displays on one line.
silverglade is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 08:45 PM Re: style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
i had to hand code the html to correct it. my new html code works , but that still makes my css not work. i had to do it by hand here.

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=utf-8" />
<title>Untitled Document</title>
<link href="file:///C|/wamp/www/code/newdogrepeat.css" rel="stylesheet" type="text/css" />
</head>


<body class="dogrepeat3">&nbsp;</body>
</body>
</html>
note i put it in the body tags. where dreamweaver for some reason puts it in the <p> tags. when i pasted your code
Code:
 @charset "utf-8";
 }
 .dogrepeat3 {
     body{background: url(worlds-strongest-dog.jpg);}     
 }
it didnt do anything, is my dreamweaver css automated tool messed up?

Last edited by silverglade; 08-26-2008 at 08:52 PM..
silverglade is offline
Reply With Quote
View Public Profile
 
Old 08-26-2008, 09:30 PM Re: style sheet background only showing up on one line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Probably not but the CSS is;
Once the CSS is messed up, DW will never recover it, as it only knows how to write CSS not debug it.

body{background: url(worlds-strongest-dog.jpg);}

NOT

}
.dogrepeat3 {

body{background: url(worlds-strongest-dog.jpg);}
}

Otherwise your style rule would only apply if the body element was inside a container with a class of dogrepeat3.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-26-2008, 09:37 PM Re: style sheet background only showing up on one line
Webmaster Talker

Posts: 611
Trades: 0
your code works , but it isnt the code DW generates. here is the code DW generates when i try to set the dog image to the background in my CSS.

Code:
@charset "utf-8";
.dogrepeat8 {
    background-image: url(worlds-strongest-dog.jpg);
}
and it didnt work, but once i put your code in the CSS. it worked.
should i just learn to code CSS by hand? because it looks like dreamweaver is messed up. derek
silverglade is offline
Reply With Quote
View Public Profile
 
Old 08-27-2008, 01:08 PM Re: style sheet background only showing up on one line
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
should i just learn to code CSS by hand?
Yes..
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-28-2008, 05:12 PM Re: style sheet background only showing up on one line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'll second that yes vote
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to style sheet background only showing up on one line
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.74194 seconds with 12 queries