Australian Websites - Promote Your URL
It is currently 19-05-2012 07:05 AM

All times are UTC + 10 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: DIV 100% - How to set div layer to 100% of screen
PostPosted: 08-02-2010 06:02 PM 
Offline
Noob Writer

Joined: 08-02-2010 06:02 PM
Posts: 24
If I resize the window, the layer's width should adjust accordingly to 100%. I tried setting div layer to 100% in CSS.

Code:
.header { width: 100% }


It doesn't make any difference. I also tried to set it to auto. No changes as well. Any ideas?


Top
 Profile  
 
 Post subject: Re: DIV 100% - How to set div layer to 100% of screen
PostPosted: 08-02-2010 11:02 PM 
Offline
Site Admin
User avatar

Joined: 06-02-2010 10:02 PM
Posts: 153
Hi digipro

Can you post the rest of html and css code?

Cheers

_________________
Bulk Submissions for SEO services :: Dirstats - Dir of Dirs
----------------------------
Find Service Web Directory


Top
 Profile  
 
 Post subject: Re: DIV 100% - How to set div layer to 100% of screen
PostPosted: 11-02-2010 10:02 PM 
Offline
Noob Writer

Joined: 08-02-2010 06:02 PM
Posts: 24
Code:
<head>
<title>Page title</title>
<style type="text/css" media="screen">
.header {
   width:100%;
   }
}
</style>
</head>

<body>
<div class="header">
            Some text
</div>
</body>
</html>


Top
 Profile  
 
 Post subject: Re: DIV 100% - How to set div layer to 100% of screen
PostPosted: 13-02-2010 07:02 PM 
Offline
Site Admin
User avatar

Joined: 06-02-2010 10:02 PM
Posts: 153
This looks like it should work.

_________________
Bulk Submissions for SEO services :: Dirstats - Dir of Dirs
----------------------------
Find Service Web Directory


Top
 Profile  
 
 Post subject: Re: DIV 100% - How to set div layer to 100% of screen
PostPosted: 13-02-2010 07:02 PM 
Offline
Noob Writer

Joined: 08-02-2010 06:02 PM
Posts: 24
Actually it doesn't. The width 100% seems to expand the div to the size of the screen. But it does not stretch it to the size of the page.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 10 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO