When shoud'nt I be using a div?

The basic layout of my site has been designed using Divs and
CSS for the positioning of Banners, Top Menus, Left Menus, Content
Area, and footer area. I have no actual content in the site apart
from a <ul> tab menu and a logo banner.
My question is when shoudnt I be using a Div? For example, in
my Div called 'banner' I have placed a second div called
'bannerimage' which will hold the logo gif. This div is floated
left inside the 'banner' div. Could I have done this using say
<h1>?
I have begun reading a book called HTML Mastery by Paul Haine
which mentions Divitis, or overuse of divs. I understand that
inside the "content" div I will have to use html markup such as
<p> <h3> or whatever, but what about the rest of the
structure of the site? Am I ok to keep the divs I have and mark
them up correctly?
www.tomkilbourn.com

~Billy~ wrote:
> The basic layout of my site has been designed using Divs
and CSS for the
> positioning of Banners, Top Menus, Left Menus, Content
Area, and footer area. I
> have no actual content in the site apart from a
tab menu and a logo
> banner.
>
> My question is when shoudnt I be using a Div? For
example, in my Div called
> 'banner' I have placed a second div called 'bannerimage'
which will hold the
> logo gif. This div is floated left inside the 'banner'
div. Could I have done
> this using say <h1>?
First off don't use the word 'banner' for your container or
images as
Nortons security will likely block it.
It's a grey area go be honest as to whether you use an h1 tag
or not. IF
you're as pure as the driven snow then no but many
develpopers take
advantage of the h1 at the top of the page to catch the
spider. The img
alt would be inside an h1 so emphasis would be
greater........but it's
not an opinion shared by others.
Bottom line is you need to make up your own mind and
eventually go your
own way because everyone has different ideas.
You only obviously need to float left if you want something
else to the
right of the flaoted container, be that container an h1 or a
<div>
If you don't use the h1 then you dont really need to house
the image in
another <div>, just insert it directly into the
'banner' <div>
> I have begun reading a book called HTML Mastery by Paul
Haine which mentions
> Divitis, or overuse of divs.
Yeah its easy to get carried away. So just ask yourself do I
really need
another <div> or not. Sometimes you do and other you
don't. As long as
you are aware of it you will eventually start to use extra
containers
only when its necesssary or you can't be asked to unpick your
code to
streamline it.
I understand that inside the "content" div I will
> have to use html markup such as <p> <h3> or
whatever, but what about the rest
> of the structure of the site? Am I ok to keep the divs I
have and mark them up
> correctly?
Sure its ok to keep the <divs> just think before you go
using then too
liberally.

Similar Messages

  • Layoutpositioning without using ap div's

    hey guys
    i'm having a really hard time getting a knack for layout without using absolute positoning. When i initially started learning web design, i used ap divs and everything was fairly straighforward.Just draw a rectangle, give it width, height, coordinates and there u go. unfortunately when testing it live, it didn't look so good and didnt look the same throughout. back to the drawing board. Now i'm trying to use divs but with padding, margins etc but this is very unintuitive way to build sites (to me). I had a member here even moinck up my entire site in probably one hour whereas i've been working months trying to get mine going! its been very frustrating to say the least.
    can anyone give me pointers about this. Before i could mock up a site in photoshop, contruct it using ap divs and everything fits (in design view at least). i look at a site and see a header, body, footer, aside see in my mind how its going to look but then creating the style entries before the layout hhas been contructed.. lets just say it looks like magic.
    so i understand to use margins and padding etc to push the designs around on a page to mock up your design, but how do you visualize this and know ahead of time to give a certain divs this much padding, or margins or any of the other style markups?
    can someone explain when you use margins vs padding? both of these are ordered by Top Right Bottom Left entries? but what does
    "margin: 0 auto" mean??
    what is the difference between
    padding and padding-top when you have T R B L entries for normal padding?
    what is the diff between margin and margin-left??
    padding vs padding-bottom??
    what does min-height do?
    margin: 0 auto mean??
    what is border top:nonw do??
    if someone could explain this i would greatly appreciate it.
    thanks!

    westwm wrote:
    so i understand to use margins and padding etc to push the designs around on a page to mock up your design, but how do you visualize this and know ahead of time to give a certain divs this much padding, or margins or any of the other style markups?
    The way I work is by looking at the final design (which I usually mock up in Fireworks) and break it down visually and mentally into a simple box concept. This does take a bit of getting used to because you need to think and anticipate what will happen to the design if this or that happens or if the user does this or that.
    Once I have a clear idea of the box construction in my mind I then start to insert the applicable <divs>, without intially adding any css styling. At a point where I have the main <divs> on the page I then being to apply the css styling. I almost never use padding on the main <div> construction as that is a PITA because of the box-model whereby it gets added to the width of the <div>, you can soon find your mathematics are incorrect which will junk the construction very quickly. Whenever and wherever possible I'll add padding to elements withing the main <divs>. So for a simple example rather that add a 25px left and right padding to a <div> which will hold some text where I need some clear space left and right I'll add it to the paragraph or heading tags which are inserted into the <div>, much cleaner and simpler.
    This really is not rocket science, once you grasp the idea it's just  a series of simple boxes you are inserting onto the page everything becomes very clear.
    westwm wrote:
    can someone explain when you use margins vs padding? both of these are ordered by Top Right Bottom Left entries? but what does
    "margin: 0 auto" mean??
    This means top/bottom padding 0. auto is used to automatically calculate and evenly distrubute the left and right padding of a container, commonly used when horizontally centering a container with a specified width within another container which could be the <body> tag or another <div> etc.
    westwm wrote:
    what is the difference between
    padding and padding-top when you have T R B L entries for normal padding?
    padding-top just adds the 'top' padding so this wont work:
    padding-top: 10px 3px 7px 8px;
    while this will work:
    padding: 10px 3px 7px 8px;
    westwm wrote:
    what is the diff between margin and margin-left??
    padding vs padding-bottom??
    Margin adds a margin to top, left, bottom, right, whereas margin-left or margin-right just specifically adds a margin left or right.
    margin is added outside of the container whilst padding is added inside of the container.
    So in an instance where you might want to move a <div> to the right by 50px you would use margin-left: 50px;
    In an instance where you want to add 50px between the left border of a <div> and its contents you would add padding-left: 50px; (but as I explained above I almost never apply padding to a main <div> as you then  have to recaculate the width of the <div> (if its specified) to account for the padding you have added.
    westwm wrote:
    what does min-height do?
    That sets a minimum height for a container i.e.' the container will never be less than the minimum height set but if it is higher as a result of it's content it will exceed the minimum height to accomodate the content, which is what you want it to do.
    westwm wrote:
    what is border top:nonw do??
    Don't know never come across it before - nonw

  • Limitations of using AP Div Tags in page design

    I have recently set up a complex page using AP Div Tags.  It looks great, and behaves exactly how I want it to.  I did this because it was quick and simple to do (I haven't used DW for about 8 years, and a lot has changed), and to take advantage of the show/hide behaviour, as there are up to 8 divs stacked one upon another, and also because the page was designed as a presentation tool, and was never intended to be accessible via the internet, so I wasn't worrying about browser compatibility, but only what it looked like on the PC it was designed on.
    HOWEVER...
    Now my boss likes the page so much, he's talking about making it publicly accessible.  What are the limitation of having used AP Divs to lay out my page, and should I consider redesigning to ensure this is going to look how I want it to on other people's PCs?  I'm afraid this is going to turn into another *** packet design that ends up in production...

    You could spend hours on the Adobe Developer site reading about best practices....
    http://www.adobe.com/devnet/dreamweaver/
    But best practices in DW are really only best practices in HTML and CSS, and a good place to start there would be here - http://www.w3schools.com.
    As you mention, your choice of layout methods may, in fact, be the best one for your purposes, although you do not have to use absolutely positioned containers to do this show/hide javascript thing.  In this regard, you may find this DW extension to be a REAL TIME SAVER -
    http://projectseven.com/extensions/listing.htm --> Auto ShowHide
    It will keep track of every element that has been show using it (rather than the DW native behavior), and when one of those tracked containers is shown, it automatically hides all of the others.

  • Safari spontaneously quits (auto-quits) when left idle (not in use) with no Safari-window open

    Safari 6.0.5 on Mac with OS X 10.8.4 (Mountain Lion) on Mac mini (October 2012) 1TB Fusion Dive (700 GB free) 16GB RAM (8GB free) spontaneously quits (auto-quits) when left idle  (not being used use) with no Safari-window is open.
    Console says nothing. No error message. Safari shows open on the Dock, and after a while it os not there. It has quitted itself!
    How to fix it?

    That sounds normal :
    Automatic Termination

  • I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can a

    I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can anyone help me please as I have several photos to edit before the end of this month. Many thanks for any help

    The "restore disk" is built into the Mac. See About Recovery.
    Need more specifics about what error messages you got while installing Adobe Flash.
    However, you can almost avoid Flash altogether by setting YouTube to play the HTML5 version instead.
    Click the Try something new! link at the bottom of the YouTube page.
    I don't know about the sound issue. Might be hardware as you think. Try other headphones to check.

  • HT204291 My iPad 4 does not show up on my TV screen when in AirPlay mirroring mode using WiFi.  The iPad displays AirPlay set to TV with the Mirroring On (green).  My iPad IOS software is 8.2 and my Apple TV software is at 7.1.  The TV displays the Apple

    My iPad 4 does not show up on my TV screen when in AirPlay mirroring mode using WiFi.  The iPad displays AirPlay set to TV with the Mirroring On (green).
    My iPad IOS software is 8.2 and my Apple TV software is at 7.1.  The TV displays the Apple Menu.  The “Settings” does however displays the General menu allowing me to see:
    Apple software:          7.1 (7003)
    Apple TV:                   Model No. A1464, Part No. MD199B/A
    Signal Strength shows 5 circles.
    It does not display the iPad screen but when I use the BT Sport App I can hear the sound but there is no video.  I have searched the internet for a solution to no avail. The problem first arose when the IOS was at 8.1+ but it worked correctly briefly when I updated to IOS 8.2.  Can you help please?

    Welcome to the Apple Community.
    Try the following steps, check whether things are working after each step where appropriate, before trying the next.
    Check AirPlay is turned on on the Apple TV (turn it off and on if it already is)
    Check that both devices are on the same network (Settings > Wifi, on the mobile device and Settings > General > Network, on the Apple TV).
    Restart the Apple TV (Settings > General > Restart).
    Restart the Apple TV by removing ALL the cables for 30 seconds.
    Restart your router. (Also try removing it’s power cord for at least 30 seconds)
    Restart your mobile device.
    If you are still having problems, the following article(s) may help you.
    Troubleshooting AirPlay
    Troubleshooting Wi-Fi networks and connections
    Recommended Wi-Fi settings
    Wifi Diagnostic Software (for Mac users)
    You may also find some help on this page, where I’ve collected some of the more unusual solutions to network issues.
    When making adjustments to your network for better optimisation, you may find some of the points mentioned on this page helpful.

  • My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    Crashing apps. What do I do to fix it?
    My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    I have the same problem.  Yahoo Sportacular aborts every time I try to open it.  It attempts to load and then the device goes right back to the home screen.  The problem started April 26 after I switched leagues from NHL to NBA. Closing all apps and Restarting doesn't solve solve the problem.
    All other apps on the iPad work fine.  IPad2, OS6.
    Any other suggestions?  I suppose I could delete the app from the iPad and try re-installing it

  • I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    DVD drives read the bottom of the disk, not the top. Smooth out the paper & try again.

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Hi SandyS_VZW,
    Yes tried resetting the wifi connection and problem still persist.
    Here it is...to make it clear. Connected thru the same wifi at home...
    -> emails (yahoo/gmail) and facebook WEBSITES are working fine and fast when using/accessing thru a browser (chrome/samsung browser) - no problem with this.
    -> emails (yahoo/gmail) and facebook APP is soooooo sloooww (thru the App). Slow I mean comparing it to using their browser/websites... news feeds/emails refreshing so quickly but not when using the APP installed in Samsung Galaxy Note 4. Slow like - It will take around 5-10minutes just to get your emails and news feed refreshed.
    THIS HAPPENS ONLY WHEN CONNECTED THRU A WIFI which has a speed of 10-20mb. It is not happening when connected to the network data/plan.
    My wife has the same Samsung Galaxy Note 4 (coming from different provider at&t) - same setup (emails, fb app), same wifi connection, but she's not experiencing anything like it.
    Not sure why, I dont want to believe that while connected to a WIFI, Verizon is restricting anything and ******* me off to make me switch to my data plan connection everytime - which is Unfair!
    Was there a known issue similar about this case?
    thanks,

  • How can i stop firefox from asking "Choose A Network Connection" when i'm offline and using my saved pages

    How can i stop Firefox from asking "Choose A Network Connection" when i'm offline and using my saved pages
    i use Firefox 22.0 on windows 7
    it's about one week that it ask for "Network Connections" when i'm offline and disconnected from the internet even when i don't open a save page and just opening Firefox with a blank page
    Image of the Error:
    http://home.sums.ac.ir/~rowshansh/firefox.png
    http://www.sums.ac.ir/~rowshansh/firefox.png

    Did you check the network setting?
    Sounds that you have set to connect automatically when a connection is not available.
    *http://kb.mozillazine.org/Autoconnect
    *http://kb.mozillazine.org/Browser_attempts_to_connect_when_already_connected

  • My wife had an iPad for a year and synced to our computer with no problem.  I recently received an ipad2 and when I tried to sync using separate apple and iTunes passwords, under her computer user name, it appears I over-road her account and synced all he

    My wife had an iPad for a year and synced to our computer with no problem.  I recently received an ipad2 and when I tried to sync using separate apple and iTunes passwords, under her computer user name, it appears I over-road her account and synced all her apps with my apps on my iPad.  I then set myself up as a new user on our computer and tried to sync.  I now get the error that my iPad is synced to another library.  How can I start over without erasing all my data on the iPad?

    Go back to her login.  Unless you deliberately erased apps, they should all be there, both yours and hers!  Then, you need to set up each iPad separately.  You will notice that they have separate names for that very purpose.
    There is no problem with multiple Apple IDs on the same iTunes on the same computer except...  Apps are permanently associated with the ID that was originally used to obtain them.  If you choose to update an app from inside iTunes and you're logged into the "wrong" ID, you must log out and back in again.
    On the bright side, you can configure either or both iPads to sync with apps and music and movies, etc. from either or both IDs.  Further, if you choose to update the apps from the iPads themselves, there is no need to log out/in.  The device handles that.  All you need is the correct password.  In my case, I use the same password for both IDs to make things easier.

  • I have a band video that I want to edit. In iMove 09, I could clip to crop or add a transition or both without altering the audio. In iMovie 11, the audio lower or drops out when I clip for and use a transtion. Is there a setting to preven this?

    I have a band video that I want to edit. In iMove 09, I could clip to crop or add a transition or both without altering the audio. In iMovie 11, the audio lower or drops out when I clip for and use a transtion. Is there a setting to preven this?

    Thanks for that info! Even in my time answering questions on iMovie Discussion Group, I never had a good understanding of when and how Optimize Movie came into play. I always would import as Optimized and Large Size and figured that was good enough. But knowing you got much, much more flexibility doing it the way you describe gives me a much better understanding of the different routes you can take into the Event Library.

  • Error when run a simple sample using jsp tag

    When i run a jsp using jsp tag, the tomcat gave me the following information:
    Resolve entity failed-//Sun Microsystems,Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
    My tld file is:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>sample</short-name>
    <uri>WEB-INF/sampleTag</uri>
    <display-name>SampleTag</display-name>
    <description>Sample TLD</description>
    <tag>
    <name>time</name>
    <tag-class>com.sample.taglib.TimeTag</tag-class>
    <body-content>empty</body-content>
    </tag>
    </taglib>
    Anybody can tell me why?
    Thanks!!!

    It's strange bacause DTD is available under given address.
    Which JSP version are you using?
    Do you have any other tld file, which uses the same DTD version? Do tags define in it work properly?
    Maby try to use 1.1 version of DTD?
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">But remember than version 1.1 has another node names (see http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd).

  • We used to get a 'whooshing' noise when we sent an eMail using mac Mail. This no longer happens. We recently updated to Mountain Lion 10.8.1  Can anyone throw light  on this please?    David

    We used to get a 'whooshing' noise when we sent an eMail using mac Mail. This no longer happens. We recently updated to Mountain Lion 10.8.1  Can anyone throw light  on this please?    David

    Hi
    I am sorry to see you are having problems with your BT Service
    I suggest you contact the forum mods they should be able to get this problem sorted for you this is a link to them http://bt.custhelp.com/app/contact_email/c/4951
    They normally reply by email or phone directly to you within 3 working days they will take personal ownership of your problem until resolved and will keep you informed of progress
    They are a UK based BT specialist team who have a good record at getting problems solved
    This is a customer to customer self help forum the only BT presence here are the forum moderators
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

Maybe you are looking for