![]() | | ||||||||
| | #1 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Hi Guys.. I am just now starting to study CSS. But I need to know how to do something if you would not mind, please. I need to be able to have a header area like this: New Page 1 But I want it to go edge to edge like CSS. Even making a table at 100%, as you can see, it does not go edge to edge. I want to have the header at the top, edge to edge and put an iframe at about 75% page width right under it. Any suggestions would very much be appreciated. Thank you, John |
| | |
| | |
| | #2 |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
|
right, thats not the right way to do it. Word of advice (6 years web design experience here lol) - never use tables to structure a website. Right for your website use this code HTML Code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <style> body { background-image:url(images/header-background.jpg); background-repeat: repeat-x; background-position:top; margin: 0 0 0 0; } </style> </head> <body> WHAT EVER CONTENT HERE </body> </html> |
| | |
| | #3 |
| HyperActive Warrior Join Date: Oct 2007
Posts: 246
Thanks: 13
Thanked 4 Times in 4 Posts
|
What Devan says will work fine. But, I don't think a blanket statement like "never use tables to structure a website." is right - it is a perfectly adequate way to get a website up quickly so for people who only want a temporary site then I see no problem with it. But, if you are learning to design websites then yes, don't use tables. |
| | |
| | #4 | |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
| Quote:
also ideally i would move that css code into a stylesheet.css file | |
| | |
| | #5 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Great... could you please give me the html code to call the css file? Thanks, John |
| | |
| | |
| | #6 |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
|
<link href="LOCATION OF STYLESHEET" rel="stylesheet" type="text/css">
|
| | |
| | #7 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Well... I put the code right above in an html file like this: <link href="style.css" rel="stylesheet" type="text/css"> I put the css file in the same directory as the test4.html file, named it style.css When page loads, it is blank. If I could just get this right the first time, I could take it from there. Thanks for all your help, John |
| | |
| | |
| | #8 |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
|
It should be put in between the <head></head> tags.
|
| | |
| | #9 |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
|
Just had a look at your site page use just copy and paste this code. Main Html Page HTML Code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> WHAT EVER CONTENT HERE </body> </html> HTML Code: body
{
background-image:url(images/header-background.jpg);
background-repeat: repeat-x;
background-position:top;
margin: 0 0 0 0;
} |
| | |
| | #10 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Something simple I am not doing right, must be. Here is file that calls the css file: http://bookmark50.com/test4.htm Here is the code in the css file: <style> body { background-image:url(images/header-background.jpg); background-repeat: repeat-y; background-position:top; margin: 0 0 0 0; } </style> |
| | |
| | |
| | #11 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Something simple I am not doing right, must be. Here is file that calls the css file: http://bookmark50.com/test4.htm Here is the code in the css file: <style> body { background-image:url(images/header-background.jpg); background-repeat: repeat-y; background-position:top; margin: 0 0 0 0; } </style> |
| | |
| | |
| | #12 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
ok... let me do that ![]() J |
| | |
| | |
| | #13 | |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
| Quote:
just have body { background-image:url(images/header-background.jpg); background-repeat: repeat-y; background-position:top; margin: 0 0 0 0; } in there | |
| | |
| | #14 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
| |
| | |
| | |
| | #15 |
| Designer/Developer War Room Member Join Date: Sep 2008
Posts: 374
Thanks: 29
Thanked 12 Times in 10 Posts
|
Yeah that's right. now for the content you will need a separate div id call it container, and ad a margin to that div to move it down so the text isnt over lapping the background. |
| | |
| | #16 |
| Ancient Warrior War Room Member Join Date: Oct 2002 Location: Daytona Beach, Florida
Posts: 433
Thanks: 18
Thanked 0 Times in 0 Posts
|
Your awesome.... Sent you a PM.... J |
| | |
| | |
| | #17 |
| Guest
Posts: n/a
|
Devan, Hope you dont mind but that charset should be UTF-8 Code: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
![]() |
|
| Tags |
| css or html |
| Thread Tools | |
| |
![]() |