logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-02-2014, 08:54 AM   #1
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default why isnt this css/divs layout working

Hi, this (as usual) is doing my head in

http://redwebhosting.co.uk/test/contentcare/

basically I have 3 divs at the top that are full width inside the wrapper, they will contain a header image, then some rotating images for prettyness, then the navigation bar. under that it is split into 2 columns id-"2-column-left" with a class applied of 'content'and id-"2-column-right"

the left column width has been specified as 720px wide in the css under "2-column-left" and looks right in dreamweaver but the width appears to be being completely ignored in a browser.

other pages for the same site will not have the right column, so I applied a class to contain the text formatting rather than specify it in the id, so I could use that class on wider content divs.

I hope I explained that well enough to be understood.

If someone could point out what I've done wrong I would be grateful.

Darren
monkeymedia is offline   Reply With Quote
Old 02-02-2014, 08:55 AM   #2
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

the four grey boxes should be one on top of the other inside the 2-column-right div
monkeymedia is offline   Reply With Quote
Old 02-02-2014, 10:10 AM   #3
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

The browser doesn't read the CSS applied to #2-column-left and #2-column-right, because they start with a number which is not allowed in HTML4. Make from it #two-column-left and #two-column-right. Or change your doctype to a HTML5 doctype, because then it's allowed to have ID's as numbers or start with a number.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 02-03-2014, 07:49 PM   #4
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

thank you very much. I feel a bit dumb now as its not the first time I have been told that. the other instance was 3 years ago mind you.
monkeymedia is offline   Reply With Quote
Old 02-04-2014, 07:37 PM   #5
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

me again

a while back, one of you showed me a better way of doing rollover buttons using sprites, which was great. I copied the css over to this new site and adjusted what I thought needed to be adjusted but its just not working right

each button should be 60px tall and 120px wide, and the entireity of the box that size should change colour when rolled over but, well its all over the place. size is specified in the css but it just seems to be ignoring it somehow and adjusting the width to suit the buton text length which isnt good.

help!

ps. same link as the original post
monkeymedia is offline   Reply With Quote
Old 02-05-2014, 10:17 AM   #6
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Sorry, don't have much time, but the HTML of a navigation is a unordered list and an anchor tag is an inline element by default, so you can give it widths, heights and margins, but this doesn't do anything. You will have to set the anchor tag first to display: block or inline-block in your CSS before you can use these properties.

There are plenty of code examples and tutorials online for a sprites image navigation.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 02-05-2014, 07:08 PM   #7
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

thank you, that worked a treat
monkeymedia is offline   Reply With Quote
Old 02-06-2014, 07:52 AM   #8
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

or why not just use css gradients?
http://www.colorzilla.com/gradient-editor/
d a v e is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 09:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com