Computer Hope

Internet & Networking => Web design => Topic started by: Zylstra on April 22, 2010, 05:02:20 PM

Title: Problem with DIV tags
Post by: Zylstra on April 22, 2010, 05:02:20 PM
Okay, so here is my problem:
I'm a picky web designer who does not like massive empty space, so I refuse to center layers. (There, I admitted it).

Anyways, on this website I am creating, I've come across an issue. The text is so close to the left side of the browser that it is hard to read, especially if your monitor goes past the sides by just a little bit.

Check out what it looks like:
http://zylblog.info/waterville/

How can I fix that sort of problem?
Title: Re: Problem with DIV tags
Post by: BC_Programmer on April 22, 2010, 07:09:22 PM
well, the top-level div is set to:

Code: [Select]
<div id="container" style="left: 0px; top: 0px">

if you remove the style= attribute, then the browsers default margin settings will be used.

you could then change the <div id="navigation"> div to read:

Code: [Select]
<div id="navigation" style="left:0px;top:0px">
so that the menu is left aligned; same for the footer div.


I don't use dreamweaver or any other "design" software and create all my pages myself via CSS,HTML and PHP, so I don't know how you'd do this in Dreamweaver (short of manually editing the code); I'd imagine these settings are buried somewhere, though.
Title: Re: Problem with DIV tags
Post by: Vikram Varaprasad on April 22, 2010, 09:49:19 PM
Use "padding-left" style property to all the tags which placed on left side....... this will give some space for the content with the tags, but the tag placements won't change. ( you said you won't like empty space )
Title: Re: Problem with DIV tags
Post by: kpac on April 23, 2010, 10:11:19 AM
Set the body and html properties a margin and padding of 0. Then set the #container div's padding values.
Title: Re: Problem with DIV tags
Post by: soybean on April 23, 2010, 11:46:36 AM
Set the body and html properties a margin and padding of 0. Then set the #container div's padding values.
Such as this?

<div id="container" style="left: 5px; top: 5px">
Title: Re: Problem with DIV tags
Post by: kpac on April 23, 2010, 12:54:40 PM
No, they're position properties.
Title: Re: Problem with DIV tags
Post by: Vikram Varaprasad on April 23, 2010, 09:24:32 PM
Code: [Select]
<div id="container" style="padding-left: 5px; padding-top: 5px">
Title: Re: Problem with DIV tags
Post by: freelance USA on May 06, 2010, 02:08:40 AM
You should creat a div which cover all other divs. And then set margin-left of your choice.


Marry
no spam, thanks
Title: Re: Problem with DIV tags
Post by: Zylstra on May 15, 2010, 06:54:19 PM
<div id="container" style="padding-left: 5px; padding-top: 5px">
That worked perfectly!
Sorry for my delay, I took some time off and I forgot to check back.

Best,
Jesse Zylstra
Title: Re: Problem with DIV tags
Post by: jettlee1 on May 29, 2010, 04:30:10 AM
set your margin. to run the div tag.
Title: Re: Problem with DIV tags
Post by: kpac on May 29, 2010, 04:51:34 AM
This has already been solved, thanks.
Title: Re: Problem with DIV tags
Post by: BC_Programmer on May 29, 2010, 09:31:52 AM
Q. How do I fix my margins?

A. Fix your margins.


Now THAT is support!  ::)