• Help
  • Search
  • Login
  • Register
  • Home

Forum: web design and graphics community

Celestial Star Forum > Web Development > Coding > Some questions about div layer layouts
Pages: [1]
« previous next »
  Print  
Author Topic: Some questions about div layer layouts  (Read 753 times)
Drusila
Angeling
*
Posts: 7



View Profile
Some questions about div layer layouts
« on: September 02, 2006, 05:25:15 PM »

I feel that I am lost at some points and want to know more about them. I am working with a div layer layout for the first time in my life so I was wondering if someone could help me with three things. (I am using Dreamweaver):

1. How do I do to center my div layout, I am using dreamweaver and I just can?t get it to be centered because I don?t get the part where you make a background that is centred I have been following this tutorial http://ethereal-design.info/?id=div_layout  
the tutorial only tells how to make a background that is on the left side.

2. and I am very confused about this withs XHTML I just don?t get it. I have running my div layout through a validator and It always complains on my DOCTYPE, It says that I have the wrong DOCTYPE and that I must change but I have tried changing and I always get wrong DOCTYPE, how am I supposed to find the right one
I also get:
there is no attribute "LEFTMARGIN".
there is no attribute "TOPMARGIN".
there is no attribute "MARGINWIDTH".
there is no attribute "MARGINHEIGHT
there is no attribute "HEIGHT".
How do I fix that? I have searched around everywhere but just can?t find any soloutions.  

3. I want a footer to my div layout but I have no ide how to add one, so I would be really glad If someone could help me.

I am really sorry for my bad english.
Logged
Blackstone
Administrator
Valkyrie Randgris
*****
Posts: 821

Oh look! People!


View Profile
Some questions about div layer layouts
« Reply #1 on: September 02, 2006, 05:43:40 PM »

There have been discussions on centering divs and giving them footers before, so I'll just direct you to those threads:

http://forum.celestial-star.net/viewtopic.php?t=2146
http://forum.celestial-star.net/viewtopic.php?t=2129
http://forum.celestial-star.net/viewtopic.php?t=2149

Those should give you the information you need, but you've read those and still have quesitons about it, feel free to ask.

As for your problems with attributes not existing, use the style attribute. ^^

For example, instead of using left-margin="xx", use style="margin-left: xx;". Make sense?
Logged
Drusila
Angeling
*
Posts: 7



View Profile
Some questions about div layer layouts
« Reply #2 on: September 03, 2006, 07:48:15 AM »

I have tried to do as they say In the other threds but nothing happens the background just won?t get centred, when I put in the code nothing at all happens.

Blackstone: When I try to change my attributes to style attributes like you say the only thing that happens is that dreamweaver still tells me that they are wrong.
Logged
Blackstone
Administrator
Valkyrie Randgris
*****
Posts: 821

Oh look! People!


View Profile
Some questions about div layer layouts
« Reply #3 on: September 03, 2006, 09:26:22 AM »

I found another way to center divs. All you need to do is add a width attribute and a margin attribute.

Say the div you are trying to center has an id of 'wrapper' and a width of 500px. You would put in this:

Code:
#wrapper {
   margin: auto;
   width: 500px;
}


You also need to put a text-align into the body, like so:

Code:
body {
   text-align: center;
}


That should work to center a div.

About the attributes. x.x I haven't worked much at all with XHTML, I actually just started to work with it, so all I can say is make sure that you have the attributes correct. I don't think that 'marginwidth' and 'marginheight' are in CSS, but the other three should be this:

Code:
style="width: xxx; margin-top: xx; margin-left: xx;"


If using the style attribute doesn't work, then try giving the element a class (class="name") and then defining those attributes in an external stylesheet...
Logged
Pages: [1]
  Print  
« previous next »
 
Jump to:  

  • Welcome, Guest
  • Members login
  • Register for free

General

  • General
  • New members
  • Announcements
  • Support / Suggestions

Art boards

  • Creative mediums
  • Requests and offers
  • Tutorials
  • Celestial Star tutorials

Web development

  • Coding
  • Web design
  • Advertisements / affiliation

Off-topic

  • The non-sense
  • Ententainment

Go up
eXTReMe Tracker
  • Valid XHTML
  • Valid CSS
Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC | Seo4Smf v0.2 © Webmaster's Talks
Loading...